src/Entity/ProductReviewComments.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProductReviewCommentsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClass: ProductReviewCommentsRepository::class)]
  6. class ProductReviewComments
  7. {
  8. #[ORM\Id]
  9. #[ORM\GeneratedValue]
  10. #[ORM\Column(type: 'integer')]
  11. private $id;
  12. #[ORM\ManyToOne(targetEntity: ProductReviews::class, inversedBy: 'productReviewComments')]
  13. private $review;
  14. #[ORM\ManyToOne(targetEntity: Clinics::class, inversedBy: 'productReviewComments')]
  15. private $clinic;
  16. #[ORM\ManyToOne(targetEntity: ClinicUsers::class, inversedBy: 'productReviewComments')]
  17. private $clinicUser;
  18. #[ORM\Column(type: 'text')]
  19. private $comment;
  20. #[ORM\Column(type: 'datetime')]
  21. private $modified;
  22. #[ORM\Column(type: 'datetime')]
  23. private $created;
  24. #[ORM\Column(type: 'integer')]
  25. private $isApproved;
  26. public function __construct()
  27. {
  28. $date = new \DateTime("now", new \DateTimeZone('Asia/Dubai'));
  29. $this->setModified($date);
  30. if ($this->getCreated() == null)
  31. {
  32. $this->setCreated($date);
  33. }
  34. }
  35. public function getId(): ?int
  36. {
  37. return $this->id;
  38. }
  39. public function getReview(): ?ProductReviews
  40. {
  41. return $this->review;
  42. }
  43. public function setReview(?ProductReviews $review): self
  44. {
  45. $this->review = $review;
  46. return $this;
  47. }
  48. public function getClinic(): ?Clinics
  49. {
  50. return $this->clinic;
  51. }
  52. public function setClinic(?Clinics $clinic): self
  53. {
  54. $this->clinic = $clinic;
  55. return $this;
  56. }
  57. public function getClinicUser(): ?ClinicUsers
  58. {
  59. return $this->clinicUser;
  60. }
  61. public function setClinicUser(?ClinicUsers $clinicUser): self
  62. {
  63. $this->clinicUser = $clinicUser;
  64. return $this;
  65. }
  66. public function getComment(): ?string
  67. {
  68. return $this->comment;
  69. }
  70. public function setComment(string $comment): self
  71. {
  72. $this->comment = $comment;
  73. return $this;
  74. }
  75. public function getModified(): ?\DateTimeInterface
  76. {
  77. return $this->modified;
  78. }
  79. public function setModified(\DateTimeInterface $modified): self
  80. {
  81. $this->modified = $modified;
  82. return $this;
  83. }
  84. public function getCreated(): ?\DateTimeInterface
  85. {
  86. return $this->created;
  87. }
  88. public function setCreated(\DateTimeInterface $created): self
  89. {
  90. $this->created = $created;
  91. return $this;
  92. }
  93. public function getIsApproved(): ?int
  94. {
  95. return $this->isApproved;
  96. }
  97. public function setIsApproved(int $isApproved): self
  98. {
  99. $this->isApproved = $isApproved;
  100. return $this;
  101. }
  102. }