| 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 | * @Groups({"view"}) |
||
| 32 | */ |
||
| 33 | private $movie; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @ORM\ManyToOne(targetEntity="App\Actors\Entity\Actor") |
||
| 37 | * @ORM\JoinColumn(nullable=false) |
||
| 38 | * @Groups({"list"}) |
||
| 39 | */ |
||
| 40 | private $actor; |
||
| 41 | |||
| 42 | public function __construct(Movie $movie, Actor $actor) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return int |
||
| 50 | */ |
||
| 51 | 1 | public function getId(): int |
|
| 55 | |||
| 56 | /** |
||
| 57 | * @return Movie |
||
| 58 | */ |
||
| 59 | public function getMovie(): Movie |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @return Actor |
||
| 66 | */ |
||
| 67 | 2 | public function getActor(): Actor |
|
| 71 | } |
||
| 72 |