src/Entity/Avis.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AvisRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. #[ORM\Entity(repositoryClassAvisRepository::class)]
  7. class Avis
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id;
  13.     #[ORM\Column(type"string",length225)]
  14.     private ?string $nom;
  15.     
  16.     #[ORM\Column(type"string",length225)]
  17.     private ?string $titre;
  18.     #[ORM\Column(type"integer",length10)]
  19.     private ?int $note;
  20.     #[ORM\Column(type"string",length100)]
  21.     private ?string $statut;
  22.     #[ORM\Column]
  23.     private ?string $commentaire;
  24.     #[ORM\Column(length10)]
  25.     private ?int $adminsid;
  26.     #[ORM\Column]
  27.     private ?\DateTimeImmutable $created_at null;
  28.     #[ORM\Column]
  29.     private ?\DateTimeImmutable $updated_at null;
  30.     public function __construct(){
  31.         $this->note 0;
  32.         $this->created_at = new \DateTimeImmutable();
  33.         $this->updated_at = new \DateTimeImmutable();
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getNom(): ?string
  40.     {
  41.         return $this->nom;
  42.     }
  43.     public function setNom(string $nom): self
  44.     {
  45.         $this->nom $nom;
  46.         return $this;
  47.     }
  48.     public function getTitre(): ?string
  49.     {
  50.         return $this->titre;
  51.     }
  52.     public function setTitre(string $titre): self
  53.     {
  54.         $this->titre $titre;
  55.         return $this;
  56.     }
  57.     public function getNote(): ?int
  58.     {
  59.         return $this->note;
  60.     }
  61.     public function setNote(int $note): self
  62.     {
  63.         $this->note $note;
  64.         return $this;
  65.     }
  66.     public function getCommentaire(): string
  67.     {
  68.         return $this->commentaire;
  69.     }
  70.     public function setCommentaire(string $commentaire): static
  71.     {
  72.         $this->commentaire $commentaire;
  73.         return $this;
  74.     }
  75.     public function getStatut(): ?string
  76.     {
  77.         return $this->statut;
  78.     }
  79.     public function setStatut(string $statut): static
  80.     {
  81.         $this->statut $statut;
  82.         return $this;
  83.     }
  84.     public function getAdminsId(): ?int
  85.     {
  86.         return $this->adminsid;
  87.     }
  88.     public function setAdminsId(int $adminsid): static
  89.     {
  90.         $this->adminsid $adminsid;
  91.         return $this;
  92.     }
  93.     public function getCreatedAt(): ?\DateTimeImmutable
  94.     {
  95.         return $this->created_at;
  96.     }
  97.     public function setCreatedAt(\DateTimeImmutable $created_at): static
  98.     {
  99.         $this->created_at $created_at;
  100.         return $this;
  101.     }
  102.     public function getUpdatedAt(): ?\DateTimeImmutable
  103.     {
  104.         return $this->updated_at;
  105.     }
  106.     public function UpdatedAt(\DateTimeImmutable $updated_at): static
  107.     {
  108.         $this->updated_at $updated_at;
  109.         return $this;
  110.     }
  111. }