|
- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- use Lc\ShopBundle\Context\FilterMerchantInterface;
- use Lc\ShopBundle\Context\ReductionCatalogInterface;
- use Lc\ShopBundle\Context\ReductionInterface;
- use Lc\ShopBundle\Context\ReductionPropertyInterface;
- use Lc\ShopBundle\Context\StatusInterface;
- use phpDocumentor\Reflection\Types\Integer;
-
-
- abstract class ReductionCatalog extends AbstractEntity implements ReductionCatalogInterface, ReductionPropertyInterface, FilterMerchantInterface, StatusInterface
- {
- use StatusTrait;
- use ReductionTrait;
- use ReductionPropertyTrait{
- ReductionPropertyTrait::__construct as private __reductionPropertyConstruct;
- }
-
-
-
- protected $title;
-
-
-
- protected $merchant;
-
-
-
- protected $productFamilies;
-
-
-
- protected $productFamily;
-
-
-
- protected $productCategories;
-
-
- public function __construct()
- {
- $this->__reductionPropertyConstruct();
- $this->productFamilies = new ArrayCollection();
- $this->productCategories = new ArrayCollection();
- }
-
- public function getTitle(): ?string
- {
- return $this->title;
- }
-
- public function setTitle(string $title): self
- {
- $this->title = $title;
-
- return $this;
- }
-
-
- public function getMerchant(): ?Merchant
- {
- return $this->merchant;
- }
-
- public function setMerchant(?Merchant $merchant): self
- {
- $this->merchant = $merchant;
-
- return $this;
- }
-
-
-
-
- public function getProductFamilies(): Collection
- {
- return $this->productFamilies;
- }
-
- public function addProductFamily(ProductFamily $productFamily): self
- {
- if (!$this->productFamilies->contains($productFamily)) {
- $this->productFamilies[] = $productFamily;
- }
-
- return $this;
- }
-
- public function removeProductFamily(ProductFamily $productFamily): self
- {
- if ($this->productFamilies->contains($productFamily)) {
- $this->productFamilies->removeElement($productFamily);
- }
-
- return $this;
- }
-
-
- public function getProductFamily(): ?ProductFamily
- {
- return $this->productFamily;
- }
-
- public function setProductFamily(?ProductFamily $productFamily): self
- {
- $this->productFamily = $productFamily;
-
- return $this;
- }
-
-
-
-
- public function getProductCategories(): Collection
- {
- return $this->productCategories;
- }
-
- public function addProductCategory(ProductCategory $productCategory): self
- {
- if (!$this->productCategories->contains($productCategory)) {
- $this->productCategories[] = $productCategory;
- }
-
- return $this;
- }
-
- public function removeProductCategory(ProductCategory $productCategory): self
- {
- if ($this->productCategories->contains($productCategory)) {
- $this->productCategories->removeElement($productCategory);
- }
-
- return $this;
- }
-
- }
|