src/Entity/Shop/Shop/Review.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Shop\Shop;
  3. use App\Entity\BaseEntity;
  4. use App\Entity\Generic\Customer\Customer;
  5. use App\Entity\Shop\Product\Product;
  6. use App\Repository\Shop\Shop\ReviewRepository;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  10. #[ORM\Entity(repositoryClassReviewRepository::class)]
  11. class Review extends BaseEntity
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\Column(type'guid'uniquetrue)]
  15.     #[ORM\GeneratedValue(strategy'CUSTOM')]
  16.     #[ORM\CustomIdGenerator(class: UuidGenerator::class)]
  17.     private ?string $id;
  18.     #[ORM\ManyToOne(inversedBy'reviews')]
  19.     #[ORM\JoinColumn(nullablefalse)]
  20.     private ?Product $product null;
  21.     #[ORM\ManyToOne(inversedBy'reviews')]
  22.     #[ORM\JoinColumn(nullablefalse)]
  23.     private ?Customer $customer null;
  24.     #[ORM\Column(typeTypes::TEXT)]
  25.     private ?string $content null;
  26.     #[ORM\Column]
  27.     private ?int $rating null;
  28.     public function getId(): ?string
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getProduct(): ?Product
  33.     {
  34.         return $this->product;
  35.     }
  36.     public function setProduct(?Product $product): static
  37.     {
  38.         $this->product $product;
  39.         return $this;
  40.     }
  41.     public function getCustomer(): ?Customer
  42.     {
  43.         return $this->customer;
  44.     }
  45.     public function setCustomer(?Customer $customer): static
  46.     {
  47.         $this->customer $customer;
  48.         return $this;
  49.     }
  50.     public function getContent(): ?string
  51.     {
  52.         return $this->content;
  53.     }
  54.     public function setContent(string $content): static
  55.     {
  56.         $this->content $content;
  57.         return $this;
  58.     }
  59.     public function getRating(): ?int
  60.     {
  61.         return $this->rating;
  62.     }
  63.     public function setRating(int $rating): static
  64.     {
  65.         $this->rating $rating;
  66.         return $this;
  67.     }
  68. }