src/Entity/Comments.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CommentsRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassCommentsRepository::class)]
  7. class Comments
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255nullabletrue)]
  14.     private ?string $author null;
  15.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  16.     private ?string $comment null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $illustration null;
  19.     #[ORM\Column]
  20.     private ?\DateTimeImmutable $createdAt null;
  21.     #[ORM\ManyToOne(inversedBy'comments')]
  22.     private ?Product $activity null;
  23.     #[ORM\Column]
  24.     private ?bool $isValid false;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function __toString()
  30.     {
  31.         return $this->comment;
  32.     }
  33.     public function getAuthor(): ?string
  34.     {
  35.         return $this->author;
  36.     }
  37.     public function setAuthor(?string $author): self
  38.     {
  39.         $this->author $author;
  40.         return $this;
  41.     }
  42.     public function getComment(): ?string
  43.     {
  44.         return $this->comment;
  45.     }
  46.     public function setComment(?string $comment): self
  47.     {
  48.         $this->comment $comment;
  49.         return $this;
  50.     }
  51.     public function getIllustration(): ?string
  52.     {
  53.         return $this->illustration;
  54.     }
  55.     public function setIllustration(string $illustration): self
  56.     {
  57.         $this->illustration $illustration;
  58.         return $this;
  59.     }
  60.     public function getCreatedAt(): ?\DateTimeImmutable
  61.     {
  62.         return $this->createdAt;
  63.     }
  64.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  65.     {
  66.         $this->createdAt $createdAt;
  67.         return $this;
  68.     }
  69.     public function getActivity(): ?Product
  70.     {
  71.         return $this->activity;
  72.     }
  73.     public function setActivity(?Product $activity): self
  74.     {
  75.         $this->activity $activity;
  76.         return $this;
  77.     }
  78.     public function isIsValid(): ?bool
  79.     {
  80.         return $this->isValid;
  81.     }
  82.     public function setIsValid(bool $isValid): self
  83.     {
  84.         $this->isValid $isValid;
  85.         return $this;
  86.     }
  87. }