src/Entity/ProductNotes.php line 9

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