src/Entity/ListItems.php line 9

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