1 | <?php |
||
18 | class MovieActor |
||
19 | { |
||
20 | /** |
||
21 | * @ORM\Id() |
||
22 | * @ORM\GeneratedValue() |
||
23 | * @ORM\Column(type="integer") |
||
24 | * @Groups({"list", "view"}) |
||
25 | */ |
||
26 | private $id; |
||
27 | |||
28 | /** |
||
29 | * @ORM\ManyToOne(targetEntity="App\Movies\Entity\Movie") |
||
30 | * @ORM\JoinColumn(nullable=false) |
||
31 | */ |
||
32 | private $movie; |
||
33 | |||
34 | /** |
||
35 | * @ORM\ManyToOne(targetEntity="App\Actors\Entity\Actor") |
||
36 | * @ORM\JoinColumn(nullable=false) |
||
37 | */ |
||
38 | private $actor; |
||
39 | |||
40 | public function __construct(Movie $movie, Actor $actor) |
||
45 | |||
46 | /** |
||
47 | * @return int |
||
48 | */ |
||
49 | public function getId(): int |
||
53 | |||
54 | /** |
||
55 | * @return Movie |
||
56 | */ |
||
57 | public function getMovie(): Movie |
||
61 | |||
62 | /** |
||
63 | * @return Actor |
||
64 | */ |
||
65 | public function getActor(): Actor |
||
69 | } |
||
70 |