src/Entity/ClinicProducts.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ClinicProductsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassClinicProductsRepository::class)]
  6. class ClinicProducts
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\ManyToOne(targetEntityClinics::class, inversedBy'clinicProducts')]
  13.     private $clinic;
  14.     #[ORM\ManyToOne(targetEntityProducts::class, inversedBy'clinicProducts')]
  15.     private $product;
  16.     #[ORM\ManyToOne(targetEntityDistributors::class, inversedBy'clinicProducts')]
  17.     private $distributor;
  18.     #[ORM\Column(type'datetime')]
  19.     private $modified;
  20.     #[ORM\Column(type'datetime')]
  21.     private $created;
  22.     #[ORM\Column(type'string'length255)]
  23.     private $savedBy;
  24.     #[ORM\Column(type'string'length255)]
  25.     private $name;
  26.     #[ORM\Column(type'integer')]
  27.     private $qty;
  28.     #[ORM\Column(type'float')]
  29.     private $unitPrice;
  30.     #[ORM\Column(type'float')]
  31.     private $total;
  32.     #[ORM\Column(type'string'length255nullabletrue)]
  33.     private $itemId;
  34.     public function __construct()
  35.     {
  36.         $this->setCreated(new \DateTime());
  37.         if ($this->getModified() == null) {
  38.             $this->setModified(new \DateTime());
  39.         }
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getClinic(): ?Clinics
  46.     {
  47.         return $this->clinic;
  48.     }
  49.     public function setClinic(?Clinics $clinic): self
  50.     {
  51.         $this->clinic $clinic;
  52.         return $this;
  53.     }
  54.     public function getProduct(): ?Products
  55.     {
  56.         return $this->product;
  57.     }
  58.     public function setProduct(?Products $product): self
  59.     {
  60.         $this->product $product;
  61.         return $this;
  62.     }
  63.     public function getDistributor(): ?Distributors
  64.     {
  65.         return $this->distributor;
  66.     }
  67.     public function setDistributor(?Distributors $distributor): self
  68.     {
  69.         $this->distributor $distributor;
  70.         return $this;
  71.     }
  72.     public function getModified(): ?\DateTimeInterface
  73.     {
  74.         return $this->modified;
  75.     }
  76.     public function setModified(\DateTimeInterface $modified): self
  77.     {
  78.         $this->modified $modified;
  79.         return $this;
  80.     }
  81.     public function getCreated(): ?\DateTimeInterface
  82.     {
  83.         return $this->created;
  84.     }
  85.     public function setCreated(\DateTimeInterface $created): self
  86.     {
  87.         $this->created $created;
  88.         return $this;
  89.     }
  90.     public function getSavedBy(): ?string
  91.     {
  92.         return $this->savedBy;
  93.     }
  94.     public function setSavedBy(string $savedBy): self
  95.     {
  96.         $this->savedBy $savedBy;
  97.         return $this;
  98.     }
  99.     public function getName(): ?string
  100.     {
  101.         return $this->name;
  102.     }
  103.     public function setName(string $name): self
  104.     {
  105.         $this->name $name;
  106.         return $this;
  107.     }
  108.     public function getQty(): ?int
  109.     {
  110.         return $this->qty;
  111.     }
  112.     public function setQty(int $qty): self
  113.     {
  114.         $this->qty $qty;
  115.         return $this;
  116.     }
  117.     public function getUnitPrice(): ?float
  118.     {
  119.         return $this->unitPrice;
  120.     }
  121.     public function setUnitPrice(float $unitPrice): self
  122.     {
  123.         $this->unitPrice $unitPrice;
  124.         return $this;
  125.     }
  126.     public function getTotal(): ?float
  127.     {
  128.         return $this->total;
  129.     }
  130.     public function setTotal(float $total): self
  131.     {
  132.         $this->total $total;
  133.         return $this;
  134.     }
  135.     public function getItemId(): ?string
  136.     {
  137.         return $this->itemId;
  138.     }
  139.     public function setItemId(?string $itemId): self
  140.     {
  141.         $this->itemId $itemId;
  142.         return $this;
  143.     }
  144. }