Esempio n. 1
0
 public static function entityDefinition()
 {
     /** @var static $columns */
     $columns = new \stdClass();
     $columns->diafilmId = Diafilm::entityDefinition()->id;
     $columns->imageId = Image::entityDefinition()->id;
     $columns->position = new Column(Column::INTEGER);
     $def = new Table($columns);
     $def->setPrimaryKey($columns->diafilmId, $columns->imageId);
     return $def;
 }
Esempio n. 2
0
 public function getCoverImage()
 {
     return Image::find($this->coverImageId);
 }