<?php
namespace App\Entity;
use App\Repository\StockRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=StockRepository::class)
*/
class Stock
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Product::class, inversedBy="stocks")
* @ORM\JoinColumn(nullable=false)
*/
private $product;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $barcode;
/**
* @ORM\Column(type="float")
*/
private $quantity;
/**
* @ORM\Column(type="float")
*/
private $purchasePrice;
/**
* @ORM\Column(type="integer")
*/
private $unitAmount;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $pmpAmount;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $packageCount;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $packagePrice;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $packageBarcode;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $packageName;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $expirationDate;
/**
* @ORM\ManyToOne(targetEntity=Shop::class, inversedBy="stocks")
*/
private $shop;
/**
* @ORM\Column(type="string", length=255)
*/
private $target;
/**
* @ORM\Column(type="boolean")
*/
private $isSynch;
/**
* @ORM\Column(type="datetime")
*/
private $creation_date;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $edition_date;
/**
* @ORM\Column(type="float")
*/
private $initialQuantity;
/**
* @ORM\ManyToOne(targetEntity=Purchases::class, inversedBy="stocks")
*/
private $purchase;
/**
* @ORM\Column(type="boolean")
*/
private $deleted = 0;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $lot;
/**
* @ORM\Column(type="boolean")
*/
private $price_change;
public function getId(): ?int
{
return $this->id;
}
public function getProduct(): ?Product
{
return $this->product;
}
public function setProduct(?Product $product): self
{
$this->product = $product;
return $this;
}
public function getBarcode(): ?string
{
return $this->barcode;
}
public function setBarcode(?string $barcode): self
{
$this->barcode = $barcode;
return $this;
}
public function getQuantity(): ?float
{
return $this->quantity;
}
public function setQuantity(float $quantity): self
{
$this->quantity = $quantity;
return $this;
}
public function getPurchasePrice(): ?float
{
return $this->purchasePrice;
}
public function setPurchasePrice(float $purchasePrice): self
{
$this->purchasePrice = $purchasePrice;
return $this;
}
public function getUnitAmount(): ?int
{
return $this->unitAmount;
}
public function setUnitAmount(int $unitAmount): self
{
$this->unitAmount = $unitAmount;
return $this;
}
public function getPmpAmount(): ?float
{
return $this->pmpAmount;
}
public function setPmpAmount(?float $pmpAmount): self
{
$this->pmpAmount = $pmpAmount;
return $this;
}
public function getPackageCount(): ?int
{
return $this->packageCount;
}
public function setPackageCount(?int $packageCount): self
{
$this->packageCount = $packageCount;
return $this;
}
public function getPackagePrice(): ?int
{
return $this->packagePrice;
}
public function setPackagePrice(?int $packagePrice): self
{
$this->packagePrice = $packagePrice;
return $this;
}
/**
* @return mixed
*/
public function getPackageBarcode()
{
return $this->packageBarcode;
}
/**
* @param mixed $packageBarcode
*/
public function setPackageBarcode($packageBarcode): void
{
$this->packageBarcode = $packageBarcode;
}
public function getExpirationDate(): ?\DateTimeInterface
{
return $this->expirationDate;
}
public function setExpirationDate(?\DateTimeInterface $expirationDate): self
{
$this->expirationDate = $expirationDate;
return $this;
}
public function getShop(): ?shop
{
return $this->shop;
}
public function setShop(?shop $shop): self
{
$this->shop = $shop;
return $this;
}
public function isSynch(): ?bool
{
return $this->isSynch;
}
public function setIsSynch(bool $isSynch): self
{
$this->isSynch = $isSynch;
return $this;
}
public function getCreationDate(): ?\DateTimeInterface
{
return $this->creation_date;
}
public function setCreationDate(\DateTimeInterface $creation_date): self
{
$this->creation_date = $creation_date;
return $this;
}
public function getEditionDate(): ?\DateTimeInterface
{
return $this->edition_date;
}
public function setEditionDate(\DateTimeInterface $edition_date): self
{
$this->edition_date = $edition_date;
return $this;
}
public function getInitialQuantity(): ?float
{
return $this->initialQuantity;
}
public function setInitialQuantity(float $initialQuantity): self
{
$this->initialQuantity = $initialQuantity;
return $this;
}
/**
* @return mixed
*/
public function getPackageName()
{
return $this->packageName;
}
/**
* @param mixed $packageName
*/
public function setPackageName($packageName): void
{
$this->packageName = $packageName;
}
public function getPurchase(): ?Purchases
{
return $this->purchase;
}
public function setPurchase(?Purchases $purchase): self
{
$this->purchase = $purchase;
return $this;
}
/**
* @return mixed
*/
public function getDeleted()
{
return $this->deleted;
}
/**
* @param mixed $deleted
*/
public function setDeleted($deleted): void
{
$this->deleted = $deleted;
}
public function getLot(): ?string
{
return $this->lot;
}
public function setLot(?string $lot): self
{
$this->lot = $lot;
return $this;
}
/**
* @return mixed
*/
public function getTarget()
{
return $this->target;
}
/**
* @param mixed $target
*/
public function setTarget($target): void
{
$this->target = $target;
}
public function isPriceChange(): ?bool
{
return $this->price_change;
}
public function setPriceChange(bool $price_change): self
{
$this->price_change = $price_change;
return $this;
}
}