src/Flexy/ShopBundle/Entity/Product/Comment.php line 14
<?phpnamespace App\Flexy\ShopBundle\Entity\Product;use ApiPlatform\Core\Annotation\ApiResource;use App\Flexy\ShopBundle\Entity\Customer\Customer;use App\Flexy\ShopBundle\Repository\Product\CommentRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ApiResource]#[ORM\Entity(repositoryClass: CommentRepository::class)]class Comment{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column(type: 'integer')]private $id;#[ORM\Column(type: 'datetime_immutable', nullable: true)]private ?\DateTimeImmutable $createdAt = null;#[ORM\Column(type: 'text', nullable: true)]private ?string $comment = null;#[ORM\ManyToOne(targetEntity: Customer::class, inversedBy: 'comments')]private ?\App\Flexy\ShopBundle\Entity\Customer\Customer $customer = null;#[ORM\ManyToOne(targetEntity: Product::class, inversedBy: 'comments')]private ?\App\Flexy\ShopBundle\Entity\Product\Product $product = null;#[ORM\Column(type: 'integer', nullable: true)]private ?int $rating = 5;public function __construct(){}public function getId(): ?int{return $this->id;}public function getCreatedAt(): ?\DateTimeImmutable{return $this->createdAt;}public function setCreatedAt(?\DateTimeImmutable $createdAt): self{$this->createdAt = $createdAt;return $this;}public function getComment(): ?string{return $this->comment;}public function setComment(?string $comment): self{$this->comment = $comment;return $this;}public function getCustomer(): ?Customer{return $this->customer;}public function setCustomer(?Customer $customer): self{$this->customer = $customer;return $this;}public function getProduct(): ?Product{return $this->product;}public function setProduct(?Product $product): self{$this->product = $product;return $this;}public function getRating(): ?int{return $this->rating;}public function setRating(?int $rating): self{$this->rating = $rating;return $this;}}