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