src/Entity/ProductNotes.php line 9

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