src/Entity/Stock.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StockRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=StockRepository::class)
  7.  */
  8. class Stock
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="stocks")
  18.      * @ORM\JoinColumn(nullable=false)
  19.      */
  20.     private $product;
  21.     /**
  22.      * @ORM\Column(type="string", length=100, nullable=true)
  23.      */
  24.     private $barcode;
  25.     /**
  26.      * @ORM\Column(type="float")
  27.      */
  28.     private $quantity;
  29.     /**
  30.      * @ORM\Column(type="float")
  31.      */
  32.     private $purchasePrice;
  33.     /**
  34.      * @ORM\Column(type="integer")
  35.      */
  36.     private $unitAmount;
  37.     /**
  38.      * @ORM\Column(type="float", nullable=true)
  39.      */
  40.     private $pmpAmount;
  41.     /**
  42.      * @ORM\Column(type="integer", nullable=true)
  43.      */
  44.     private $packageCount;
  45.     /**
  46.      * @ORM\Column(type="integer", nullable=true)
  47.      */
  48.     private $packagePrice;
  49.     /**
  50.      * @ORM\Column(type="string", length=100, nullable=true)
  51.      */
  52.     private $packageBarcode;
  53.     /**
  54.      * @ORM\Column(type="string", length=100, nullable=true)
  55.      */
  56.     private $packageName;
  57.     /**
  58.      * @ORM\Column(type="datetime", nullable=true)
  59.      */
  60.     private $expirationDate;
  61.     /**
  62.      * @ORM\ManyToOne(targetEntity=Shop::class, inversedBy="stocks")
  63.      */
  64.     private $shop;
  65.     /**
  66.      * @ORM\Column(type="string", length=255)
  67.      */
  68.     private $target;
  69.     /**
  70.      * @ORM\Column(type="boolean")
  71.      */
  72.     private $isSynch;
  73.     /**
  74.      * @ORM\Column(type="datetime")
  75.      */
  76.     private $creation_date;
  77.     /**
  78.      * @ORM\Column(type="datetime", nullable=true)
  79.      */
  80.     private $edition_date;
  81.     /**
  82.      * @ORM\Column(type="float")
  83.      */
  84.     private $initialQuantity;
  85.     /**
  86.      * @ORM\ManyToOne(targetEntity=Purchases::class, inversedBy="stocks")
  87.      */
  88.     private $purchase;
  89.     /**
  90.      * @ORM\Column(type="boolean")
  91.      */
  92.     private $deleted 0;
  93.     /**
  94.      * @ORM\Column(type="string", nullable=true)
  95.      */
  96.     private $lot;
  97.     /**
  98.      * @ORM\Column(type="boolean")
  99.      */
  100.     private $price_change;
  101.     public function getId(): ?int
  102.     {
  103.         return $this->id;
  104.     }
  105.     public function getProduct(): ?Product
  106.     {
  107.         return $this->product;
  108.     }
  109.     public function setProduct(?Product $product): self
  110.     {
  111.         $this->product $product;
  112.         return $this;
  113.     }
  114.     public function getBarcode(): ?string
  115.     {
  116.         return $this->barcode;
  117.     }
  118.     public function setBarcode(?string $barcode): self
  119.     {
  120.         $this->barcode $barcode;
  121.         return $this;
  122.     }
  123.     public function getQuantity(): ?float
  124.     {
  125.         return $this->quantity;
  126.     }
  127.     public function setQuantity(float $quantity): self
  128.     {
  129.         $this->quantity $quantity;
  130.         return $this;
  131.     }
  132.     public function getPurchasePrice(): ?float
  133.     {
  134.         return $this->purchasePrice;
  135.     }
  136.     public function setPurchasePrice(float $purchasePrice): self
  137.     {
  138.         $this->purchasePrice $purchasePrice;
  139.         return $this;
  140.     }
  141.     public function getUnitAmount(): ?int
  142.     {
  143.         return $this->unitAmount;
  144.     }
  145.     public function setUnitAmount(int $unitAmount): self
  146.     {
  147.         $this->unitAmount $unitAmount;
  148.         return $this;
  149.     }
  150.     public function getPmpAmount(): ?float
  151.     {
  152.         return $this->pmpAmount;
  153.     }
  154.     public function setPmpAmount(?float $pmpAmount): self
  155.     {
  156.         $this->pmpAmount $pmpAmount;
  157.         return $this;
  158.     }
  159.     public function getPackageCount(): ?int
  160.     {
  161.         return $this->packageCount;
  162.     }
  163.     public function setPackageCount(?int $packageCount): self
  164.     {
  165.         $this->packageCount $packageCount;
  166.         return $this;
  167.     }
  168.     public function getPackagePrice(): ?int
  169.     {
  170.         return $this->packagePrice;
  171.     }
  172.     public function setPackagePrice(?int $packagePrice): self
  173.     {
  174.         $this->packagePrice $packagePrice;
  175.         return $this;
  176.     }
  177.     /**
  178.      * @return mixed
  179.      */
  180.     public function getPackageBarcode()
  181.     {
  182.         return $this->packageBarcode;
  183.     }
  184.     /**
  185.      * @param mixed $packageBarcode
  186.      */
  187.     public function setPackageBarcode($packageBarcode): void
  188.     {
  189.         $this->packageBarcode $packageBarcode;
  190.     }
  191.     public function getExpirationDate(): ?\DateTimeInterface
  192.     {
  193.         return $this->expirationDate;
  194.     }
  195.     public function setExpirationDate(?\DateTimeInterface $expirationDate): self
  196.     {
  197.         $this->expirationDate $expirationDate;
  198.         return $this;
  199.     }
  200.     public function getShop(): ?shop
  201.     {
  202.         return $this->shop;
  203.     }
  204.     public function setShop(?shop $shop): self
  205.     {
  206.         $this->shop $shop;
  207.         return $this;
  208.     }
  209.     public function isSynch(): ?bool
  210.     {
  211.         return $this->isSynch;
  212.     }
  213.     public function setIsSynch(bool $isSynch): self
  214.     {
  215.         $this->isSynch $isSynch;
  216.         return $this;
  217.     }
  218.     public function getCreationDate(): ?\DateTimeInterface
  219.     {
  220.         return $this->creation_date;
  221.     }
  222.     public function setCreationDate(\DateTimeInterface $creation_date): self
  223.     {
  224.         $this->creation_date $creation_date;
  225.         return $this;
  226.     }
  227.     public function getEditionDate(): ?\DateTimeInterface
  228.     {
  229.         return $this->edition_date;
  230.     }
  231.     public function setEditionDate(\DateTimeInterface $edition_date): self
  232.     {
  233.         $this->edition_date $edition_date;
  234.         return $this;
  235.     }
  236.     public function getInitialQuantity(): ?float
  237.     {
  238.         return $this->initialQuantity;
  239.     }
  240.     public function setInitialQuantity(float $initialQuantity): self
  241.     {
  242.         $this->initialQuantity $initialQuantity;
  243.         return $this;
  244.     }
  245.     /**
  246.      * @return mixed
  247.      */
  248.     public function getPackageName()
  249.     {
  250.         return $this->packageName;
  251.     }
  252.     /**
  253.      * @param mixed $packageName
  254.      */
  255.     public function setPackageName($packageName): void
  256.     {
  257.         $this->packageName $packageName;
  258.     }
  259.     public function getPurchase(): ?Purchases
  260.     {
  261.         return $this->purchase;
  262.     }
  263.     public function setPurchase(?Purchases $purchase): self
  264.     {
  265.         $this->purchase $purchase;
  266.         return $this;
  267.     }
  268.     /**
  269.      * @return mixed
  270.      */
  271.     public function getDeleted()
  272.     {
  273.         return $this->deleted;
  274.     }
  275.     /**
  276.      * @param mixed $deleted
  277.      */
  278.     public function setDeleted($deleted): void
  279.     {
  280.         $this->deleted $deleted;
  281.     }
  282.     public function getLot(): ?string
  283.     {
  284.         return $this->lot;
  285.     }
  286.     public function setLot(?string $lot): self
  287.     {
  288.         $this->lot $lot;
  289.         return $this;
  290.     }
  291.     /**
  292.      * @return mixed
  293.      */
  294.     public function getTarget()
  295.     {
  296.         return $this->target;
  297.     }
  298.     /**
  299.      * @param mixed $target
  300.      */
  301.     public function setTarget($target): void
  302.     {
  303.         $this->target $target;
  304.     }
  305.     public function isPriceChange(): ?bool
  306.     {
  307.         return $this->price_change;
  308.     }
  309.     public function setPriceChange(bool $price_change): self
  310.     {
  311.         $this->price_change $price_change;
  312.         return $this;
  313.     }
  314. }