src/Entity/Product/CustomerComment.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Product;
  3. use App\Entity\User;
  4. use App\Repository\Product\CustomerCommentRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassCustomerCommentRepository::class)]
  8. class CustomerComment
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\ManyToOne]
  15.     private ?User $user null;
  16.     #[ORM\ManyToOne(inversedBy'customerComments')]
  17.     private ?Product $product null;
  18.     #[ORM\Column(typeTypes::TEXT)]
  19.     private ?string $content null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getUser(): ?User
  25.     {
  26.         return $this->user;
  27.     }
  28.     public function setUser(?User $user): static
  29.     {
  30.         $this->user $user;
  31.         return $this;
  32.     }
  33.     public function getProduct(): ?Product
  34.     {
  35.         return $this->product;
  36.     }
  37.     public function setProduct(?Product $product): static
  38.     {
  39.         $this->product $product;
  40.         return $this;
  41.     }
  42.     public function getContent(): ?string
  43.     {
  44.         return $this->content;
  45.     }
  46.     public function setContent(string $content): static
  47.     {
  48.         $this->content $content;
  49.         return $this;
  50.     }
  51. }