src/Entity/PostCommentaires.php line 8

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Entity(repositoryClass\App\Repository\PostCommentairesRepository::class)]
  5. class PostCommentaires
  6. {
  7.     #[ORM\Id]
  8.     #[ORM\GeneratedValue]
  9.     #[ORM\Column(type'integer')]
  10.     private int $id;
  11.     #[ORM\ManyToOne(targetEntity\App\Entity\Post::class, inversedBy'postCommentaires')]
  12.     private mixed $post;
  13.     #[ORM\Column(type'datetime'nullabletrue)]
  14.     private mixed $date;
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private ?string $auteurnull;
  17.     #[ORM\Column(type'text'nullabletrue)]
  18.     private ?string  $contentnull;
  19.     #[ORM\Column(type'string'length255nullabletrue)]
  20.     private ?string $tokennull;
  21.     #[ORM\Column(type'datetime'nullabletrue)]
  22.     private mixed $date_comment;
  23.     #[ORM\Column(type'text'nullabletrue)]
  24.     private ?string $texte_emailnull;
  25.     #[ORM\Column(type'boolean'nullabletrue)]
  26.     private ?bool $doit_valider;
  27.     #[ORM\Column(type'boolean'nullabletrue)]
  28.     private ?bool $valide;
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getPost(): ?Post
  34.     {
  35.         return $this->post;
  36.     }
  37.     public function setPost(?Post $post): self
  38.     {
  39.         $this->post $post;
  40.         return $this;
  41.     }
  42.     public function getDate(): ?\DateTimeInterface
  43.     {
  44.         return $this->date;
  45.     }
  46.     public function setDate(?\DateTimeInterface $date): self
  47.     {
  48.         $this->date $date;
  49.         return $this;
  50.     }
  51.     public function getAuteur(): ?string
  52.     {
  53.         return $this->auteur;
  54.     }
  55.     public function setAuteur(?string $auteur): self
  56.     {
  57.         $this->auteur $auteur;
  58.         return $this;
  59.     }
  60.     public function getContent(): ?string
  61.     {
  62.         return $this->content;
  63.     }
  64.     public function setContent(?string $content): self
  65.     {
  66.         $this->content $content;
  67.         return $this;
  68.     }
  69.     public function getToken(): ?string
  70.     {
  71.         return $this->token;
  72.     }
  73.     public function setToken(?string $token): self
  74.     {
  75.         $this->token $token;
  76.         return $this;
  77.     }
  78.     public function getDateComment(): ?\DateTimeInterface
  79.     {
  80.         return $this->date_comment;
  81.     }
  82.     public function setDateComment(?\DateTimeInterface $date_comment): self
  83.     {
  84.         $this->date_comment $date_comment;
  85.         return $this;
  86.     }
  87.     public function getTexteEmail(): ?string
  88.     {
  89.         return $this->texte_email;
  90.     }
  91.     public function setTexteEmail(?string $texte_email): self
  92.     {
  93.         $this->texte_email $texte_email;
  94.         return $this;
  95.     }
  96.     public function getDoitValider(): ?bool
  97.     {
  98.         return $this->doit_valider;
  99.     }
  100.     public function setDoitValider(?bool $doit_valider): self
  101.     {
  102.         $this->doit_valider $doit_valider;
  103.         return $this;
  104.     }
  105.     public function getDoitValiderString(): string
  106.     {
  107.         if ($this->getDoitValider()) {
  108.             return "Oui";
  109.         } else {
  110.             return "Non";
  111.         }
  112.     }
  113.     public function getValide(): ?bool
  114.     {
  115.         return $this->valide;
  116.     }
  117.     public function setValide(?bool $valide): self
  118.     {
  119.         $this->valide $valide;
  120.         return $this;
  121.     }
  122.     public function getValideString(): string
  123.     {
  124.         if ($this->getValide()) {
  125.             return "Oui";
  126.         } else {
  127.             return "Non";
  128.         }
  129.     }
  130. }