|
- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
-
- /**
- * @ORM\MappedSuperclass()
- */
- abstract class ProductFamily extends AbstractDocumentEntity
- {
- /**
- * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="productFamilies")
- * @ORM\JoinColumn(nullable=false)
- */
- protected $merchant;
-
- /**
- * @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\ProductCategoryInterface", inversedBy="productFamilies")
- */
- protected $productCategory;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\TaxRateInterface")
- * @ORM\JoinColumn(nullable=true)
- */
- protected $taxRate;
-
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $price;
-
- /**
- * @ORM\Column(type="string", length=31, nullable=true)
- */
- protected $unit;
-
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $step;
-
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $stock;
-
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $availableQuantity;
-
- /**
- * @ORM\Column(type="string", length=31, nullable=true)
- */
- protected $behaviorOutOfStock;
-
- /**
- * @ORM\Column(type="string", length=31)
- */
- protected $behaviorCountStock;
-
- public function __construct()
- {
- $this->productCategory = new ArrayCollection();
- }
-
- public function getMerchant(): ?Merchant
- {
- return $this->merchant;
- }
-
- public function setMerchant(?Merchant $merchant): self
- {
- $this->merchant = $merchant;
-
- return $this;
- }
-
- /**
- * @return Collection|ProductCategory[]
- */
- public function getProductCategory(): Collection
- {
- return $this->productCategory;
- }
-
- public function addProductCategory(ProductCategory $productCategory): self
- {
- if (!$this->productCategory->contains($productCategory)) {
- $this->productCategory[] = $productCategory;
- }
-
- return $this;
- }
-
- public function removeProductCategory(ProductCategory $productCategory): self
- {
- if ($this->productCategory->contains($productCategory)) {
- $this->productCategory->removeElement($productCategory);
- }
-
- return $this;
- }
-
- public function getTaxRate(): ?TaxRate
- {
- return $this->taxRate;
- }
-
- public function setTaxRate(?TaxRate $taxRate): self
- {
- $this->taxRate = $taxRate;
-
- return $this;
- }
-
- public function getUnit(): ?string
- {
- return $this->unit;
- }
-
- public function setUnit(?string $unit): self
- {
- $this->unit = $unit;
-
- return $this;
- }
-
- public function getPrice(): ?float
- {
- return $this->price;
- }
-
- public function setPrice(?float $price): self
- {
- $this->price = $price;
-
- return $this;
- }
-
- public function getStep(): ?float
- {
- return $this->price;
- }
-
- public function setStep(?float $price): self
- {
- $this->price = $price;
-
- return $this;
- }
-
- public function getStock(): ?float
- {
- return $this->stock;
- }
-
- public function setStock(?float $stock): self
- {
- $this->stock = $stock;
-
- return $this;
- }
-
- public function getAvailableQuantity(): ?float
- {
- return $this->availableQuantity;
- }
-
- public function setAvailableQuantity(?float $availableQuantity): self
- {
- $this->availableQuantity = $availableQuantity;
-
- return $this;
- }
-
- public function getBehaviorOutOfStock(): ?string
- {
- return $this->behaviorOutOfStock;
- }
-
- public function setBehaviorOutOfStock(?string $behaviorOutOfStock): self
- {
- $this->behaviorOutOfStock = $behaviorOutOfStock;
-
- return $this;
- }
-
- public function getBehaviorCountStock(): ?string
- {
- return $this->behaviorCountStock;
- }
-
- public function setBehaviorCountStock(string $behaviorCountStock): self
- {
- $this->behaviorCountStock = $behaviorCountStock;
-
- return $this;
- }
- }
|