| 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 | */ |
||
| 33 | private $user; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * UserWatchedMovies constructor. |
||
| 37 | * |
||
| 38 | * @param User $user |
||
| 39 | * @param Movie $movie |
||
| 40 | * @param float|null $vote |
||
| 41 | * @param \DateTimeInterface|null $watchedAt |
||
| 42 | * |
||
| 43 | * @throws \Exception |
||
| 44 | */ |
||
| 45 | 5 | public function __construct(User $user, Movie $movie, ?float $vote, ?\DateTimeInterface $watchedAt) |
|
| 50 | |||
| 51 | 2 | public function getId(): ?int |
|
| 52 | { |
||
| 53 | 2 | return $this->id; |
|
| 54 | } |
||
| 55 | |||
| 56 | 2 | public function getUser(): ?User |
|
| 60 | |||
| 61 | public function updateUser(User $user) |
||
| 65 | } |
||
| 66 |