| 1 | <?php |
||
| 19 | class UserWatchedMovie extends WatchedMovie |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @ORM\Id() |
||
| 23 | * @ORM\GeneratedValue() |
||
| 24 | * @ORM\Column(type="integer") |
||
| 25 | * @Groups({"list"}) |
||
| 26 | */ |
||
| 27 | private $id; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @ORM\ManyToOne(targetEntity="App\Users\Entity\User") |
||
| 31 | * @ORM\JoinColumn(nullable=false) |
||
| 32 | * @Groups({"list"}) |
||
| 33 | */ |
||
| 34 | private $user; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * UserWatchedMovies constructor. |
||
| 38 | * |
||
| 39 | * @param User $user |
||
| 40 | * @param Movie $movie |
||
| 41 | * @param float|null $vote |
||
| 42 | * @param \DateTimeInterface|null $watchedAt |
||
| 43 | * |
||
| 44 | * @throws \Exception |
||
| 45 | */ |
||
| 46 | 7 | public function __construct(User $user, Movie $movie, ?float $vote, ?\DateTimeInterface $watchedAt) |
|
| 51 | |||
| 52 | public function getId(): ?int |
||
| 53 | { |
||
| 54 | return $this->id; |
||
| 55 | } |
||
| 56 | |||
| 57 | 2 | public function getUser(): ?User |
|
| 61 | |||
| 62 | public function updateUser(User $user) |
||
| 66 | } |
||
| 67 |