|
@@ -13,34 +13,34 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|
|
#[ORM\Entity(repositoryClass: FilmRepository::class)]
|
|
|
class Film
|
|
|
{
|
|
|
- #[ORM\Column(name: "id", type: "integer")]
|
|
|
+ #[ORM\Column(name: "id", type: Types::INTEGER)]
|
|
|
#[ORM\Id]
|
|
|
#[ORM\GeneratedValue(strategy: "AUTO")]
|
|
|
|
|
|
private ?int $id = null;
|
|
|
|
|
|
- #[ORM\Column(name: "titre", type: "string", length: 191)]
|
|
|
+ #[ORM\Column(name: "titre", type: Types::STRING, length: 191)]
|
|
|
|
|
|
private ?string $titre = null;
|
|
|
|
|
|
- #[ORM\Column(name: "annee", type: "date", nullable: true)]
|
|
|
+ #[ORM\Column(name: "annee", type: Types::DATE_IMMUTABLE, nullable: true)]
|
|
|
|
|
|
private ?\DateTimeInterface $annee = null;
|
|
|
|
|
|
- #[ORM\Column(name: "date_submited", type: "datetime", nullable: true)]
|
|
|
+ #[ORM\Column(name: "date_submited", type: Types::DATETIME_IMMUTABLE, nullable: true)]
|
|
|
|
|
|
private ?\DateTimeInterface $dateSubmited = null;
|
|
|
|
|
|
- #[ORM\Column(name: "lien", type: "string", length: 191, nullable: true)]
|
|
|
+ #[ORM\Column(name: "lien", type: Types::STRING, length: 191, nullable: true)]
|
|
|
#[Assert\Url()]
|
|
|
|
|
|
private ?string $lien = null;
|
|
|
|
|
|
- #[ORM\Column(name: "note", type: "float", nullable: true)]
|
|
|
+ #[ORM\Column(name: "note", type: Types::FLOAT, nullable: true)]
|
|
|
|
|
|
private ?float $note = null;
|
|
|
|
|
|
- #[ORM\Column(name: "nb_coms", type: "integer", nullable: true)]
|
|
|
+ #[ORM\Column(name: "nb_coms", type: Types::INTEGER, nullable: true)]
|
|
|
|
|
|
private ?int $nbComs = null;
|
|
|
|
|
@@ -79,7 +79,7 @@ class Film
|
|
|
|
|
|
private ?Collection $genres = null;
|
|
|
|
|
|
- #[ORM\Column(type: "text", nullable: true)]
|
|
|
+ #[ORM\Column(type: Types::TEXT, nullable: true)]
|
|
|
|
|
|
private ?string $information = null;
|
|
|
|
|
@@ -96,7 +96,7 @@ class Film
|
|
|
$this->usersWhoSeen = new \Doctrine\Common\Collections\ArrayCollection();
|
|
|
$this->genres = new \Doctrine\Common\Collections\ArrayCollection();
|
|
|
$this->commentaires = new \Doctrine\Common\Collections\ArrayCollection();
|
|
|
- $this->setDateSubmited(new \DateTime());
|
|
|
+ $this->setDateSubmited(new \DateTimeImmutable());
|
|
|
$this->mediaVideos = new ArrayCollection();
|
|
|
}
|
|
|
|