1 | <?php |
||
20 | class Genre implements TranslatableInterface |
||
21 | { |
||
22 | use TranslatableTrait; |
||
23 | |||
24 | /** |
||
25 | * @ORM\Id() |
||
26 | * @ORM\GeneratedValue() |
||
27 | * @ORM\Column(type="integer") |
||
28 | * @Groups({"list", "view"}) |
||
29 | */ |
||
30 | private $id; |
||
31 | |||
32 | /** |
||
33 | * @ORM\Column(type="integer", options={"default": 0}) |
||
34 | * @Groups({"ROLE_MODER", "ROLE_ADMIN"}) |
||
35 | */ |
||
36 | private $tmdb_id; |
||
37 | |||
38 | /** |
||
39 | * @var $translations GenreTranslations[]|ArrayCollection |
||
40 | * @ORM\OneToMany(targetEntity="App\Genres\Entity\GenreTranslations", mappedBy="genre", cascade={"persist", "remove"}) |
||
41 | * @Assert\Valid(traverse=true) |
||
42 | * @Groups({"list", "view"}) |
||
43 | */ |
||
44 | private $translations; |
||
45 | |||
46 | 2 | public function __construct(?int $tmdb_id = 0) |
|
51 | |||
52 | 11 | public function getId() |
|
56 | |||
57 | 4 | public function getTmdbId() |
|
61 | } |