src/Entity/ControlledDrugFiles.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ControlledDrugFilesRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassControlledDrugFilesRepository::class)]
  6. class ControlledDrugFiles
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\ManyToOne(targetEntityOrders::class, inversedBy'controlledDrugFiles')]
  13.     private $orders;
  14.     #[ORM\ManyToOne(targetEntityDistributors::class, inversedBy'controlledDrugFiles')]
  15.     private $distributor;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $purchaseOrder;
  18.     #[ORM\Column(type'datetime')]
  19.     private $modified;
  20.     #[ORM\Column(type'date')]
  21.     private $created;
  22.     public function __construct()
  23.     {
  24.         $this->setModified(new \DateTime());
  25.         if ($this->getCreated() == null) {
  26.             $this->setCreated(new \DateTime());
  27.         }
  28.     }
  29.     public function getId(): ?int
  30.     {
  31.         return $this->id;
  32.     }
  33.     public function getOrders(): ?Orders
  34.     {
  35.         return $this->orders;
  36.     }
  37.     public function setOrders(?Orders $orders): self
  38.     {
  39.         $this->orders $orders;
  40.         return $this;
  41.     }
  42.     public function getDistributor(): ?Distributors
  43.     {
  44.         return $this->distributor;
  45.     }
  46.     public function setDistributor(?Distributors $distributor): self
  47.     {
  48.         $this->distributor $distributor;
  49.         return $this;
  50.     }
  51.     public function getPurchaseOrder(): ?string
  52.     {
  53.         return $this->purchaseOrder;
  54.     }
  55.     public function setPurchaseOrder(?string $purchaseOrder): self
  56.     {
  57.         $this->purchaseOrder $purchaseOrder;
  58.         return $this;
  59.     }
  60.     public function getModified(): ?\DateTimeInterface
  61.     {
  62.         return $this->modified;
  63.     }
  64.     public function setModified(\DateTimeInterface $modified): self
  65.     {
  66.         $this->modified $modified;
  67.         return $this;
  68.     }
  69.     public function getCreated(): ?\DateTimeInterface
  70.     {
  71.         return $this->created;
  72.     }
  73.     public function setCreated(\DateTimeInterface $created): self
  74.     {
  75.         $this->created $created;
  76.         return $this;
  77.     }
  78. }