src/Entity/ProductComment.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Serializer\Annotation\Groups;
  5. #[ORM\Entity]
  6. #[ORM\Table(name"productcomment")]
  7. class ProductComment
  8. {
  9.     #[ORM\Column(type'integer'uniquetrue)]
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue(strategy'AUTO')]
  12.     #[Groups(['company''category'])]
  13.     private $id;
  14.     #[ORM\Column(name'comment'type'text')]
  15.     #[Groups(['company''category'])]
  16.     private $comment;
  17.     #[ORM\Column(name'etoiles'type'integer'nullablefalse)]
  18.     #[Groups(['company''category'])]
  19.     private $etoiles;
  20.     #[ORM\ManyToOne(targetEntity'App\Entity\User')]
  21.     #[ORM\JoinColumn(name'creator'referencedColumnName'id'nullablefalseonDelete'CASCADE')]
  22.     #[Groups(['company''category'])]
  23.     private $creator;
  24.     #[ORM\ManyToOne(targetEntity'App\Entity\Product'inversedBy"comments")]
  25.     #[ORM\JoinColumn(name'product'referencedColumnName'id'nullablefalseonDelete'CASCADE')]
  26.     #[Groups(['company''category'])]
  27.     private $product;
  28.     #[ORM\Column(name'created_at'type'date')]
  29.     #[Groups(['company''category'])]
  30.     private $createdAt;
  31.     /**
  32.      * @return mixed
  33.      */
  34.     public function getId()
  35.     {
  36.         return $this->id;
  37.     }
  38.     /**
  39.      * @param mixed $id
  40.      */
  41.     public function setId($id)
  42.     {
  43.         $this->id $id;
  44.     }
  45.     /**
  46.      * @return mixed
  47.      */
  48.     public function getEtoiles()
  49.     {
  50.         return $this->etoiles;
  51.     }
  52.     /**
  53.      * @param mixed $etoiles
  54.      */
  55.     public function setEtoiles($etoiles)
  56.     {
  57.         $this->etoiles $etoiles;
  58.     }
  59.     /**
  60.      * @return mixed
  61.      */
  62.     public function getComment()
  63.     {
  64.         return $this->comment;
  65.     }
  66.     /**
  67.      * @param mixed $comment
  68.      */
  69.     public function setComment($comment)
  70.     {
  71.         $this->comment $comment;
  72.     }
  73.     /**
  74.      * @return mixed
  75.      */
  76.     public function getCreator()
  77.     {
  78.         return $this->creator;
  79.     }
  80.     /**
  81.      * @param mixed $creator
  82.      */
  83.     public function setCreator($creator)
  84.     {
  85.         $this->creator $creator;
  86.     }
  87.     /**
  88.      * @return mixed
  89.      */
  90.     public function getProduct()
  91.     {
  92.         return $this->product;
  93.     }
  94.     /**
  95.      * @param mixed $product
  96.      */
  97.     public function setProduct($product): void
  98.     {
  99.         $this->product $product;
  100.     }
  101.     /**
  102.      * @return \DateTime
  103.      */
  104.     public function getCreatedAt(): \DateTime
  105.     {
  106.         return $this->createdAt;
  107.     }
  108.     /**
  109.      * @param \DateTime $createdAt
  110.      */
  111.     public function setCreatedAt(\DateTime $createdAt): void
  112.     {
  113.         $this->createdAt $createdAt;
  114.     }
  115. }