custom/plugins/NetiNextEasyCoupon/src/Core/Content/Product/Aggregate/EasyCouponProductEntity.php line 16

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace NetInventors\NetiNextEasyCoupon\Core\Content\Product\Aggregate;
  4. use NetInventors\NetiNextEasyCoupon\Core\Content\Product\Aggregate\Condition\ConditionCollection;
  5. use NetInventors\NetiNextEasyCoupon\Core\Content\Product\Aggregate\EasyCouponProductTranslation\EasyCouponProductTranslationCollection;
  6. use NetInventors\NetiNextEasyCoupon\Core\Content\TypeContainingEntity;
  7. use NetInventors\NetiNextEasyCoupon\Core\Framework\Pricing\ProductValuePriceCollection;
  8. use NetInventors\NetiNextEasyCoupon\Core\Framework\Traits\ValueTypeTrait;
  9. use Shopware\Core\Content\Product\ProductEntity;
  10. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  11. use Shopware\Core\System\Tax\TaxEntity;
  12. class EasyCouponProductEntity extends TypeContainingEntity
  13. {
  14.     use EntityIdTrait;
  15.     use ValueTypeTrait;
  16.     public const PREFIX_VALUE_TYPE    'VALUE_TYPE_';
  17.     public const VALUE_TYPE_FIXED     20010;
  18.     public const VALUE_TYPE_RANGE     20020;
  19.     public const VALUE_TYPE_SELECTION 20030;
  20.     /**
  21.      * @var ProductEntity|null
  22.      */
  23.     protected $product;
  24.     /**
  25.      * @var string|null
  26.      */
  27.     protected $productId;
  28.     /**
  29.      * @var bool
  30.      */
  31.     protected $postal;
  32.     /**
  33.      * @var ProductValuePriceCollection|null
  34.      */
  35.     protected $value;
  36.     /**
  37.      * @var bool
  38.      */
  39.     protected $shippingCharge;
  40.     /**
  41.      * @var bool
  42.      */
  43.     protected $excludeFromShippingCosts;
  44.     /**
  45.      * @var bool
  46.      */
  47.     protected $noDeliveryCharge;
  48.     /**
  49.      * @var bool
  50.      */
  51.     protected $customerGroupCharge;
  52.     /**
  53.      * @var string|null
  54.      */
  55.     protected $comment;
  56.     /**
  57.      * @var string
  58.      */
  59.     protected $orderPositionNumber;
  60.     /**
  61.      * @var TaxEntity|null
  62.      */
  63.     protected $tax;
  64.     /**
  65.      * @var string|null
  66.      */
  67.     protected $taxId;
  68.     /**
  69.      * @var ?EasyCouponProductTranslationCollection
  70.      */
  71.     protected $translations;
  72.     /**
  73.      * @var bool
  74.      */
  75.     protected $combineVouchers;
  76.     /**
  77.      * @var string
  78.      */
  79.     protected $title;
  80.     /**
  81.      * @var ConditionCollection|null
  82.      */
  83.     protected $conditions;
  84.     /**
  85.      * @var int|null
  86.      */
  87.     protected $validityTime;
  88.     /**
  89.      * @var bool|null
  90.      */
  91.     protected      $validityByEndOfYear;
  92.     protected bool $reduceShippingCosts;
  93.     protected bool $recipientInputEnabled    false;
  94.     protected bool $requestedDeliveryEnabled false;
  95.     protected bool $deliveryMessageEnabled   false;
  96.     public function getProduct(): ?ProductEntity
  97.     {
  98.         return $this->product;
  99.     }
  100.     public function setProduct(?ProductEntity $product): void
  101.     {
  102.         $this->product $product;
  103.     }
  104.     public function getProductId(): ?string
  105.     {
  106.         return $this->productId;
  107.     }
  108.     public function setProductId(?string $productId): void
  109.     {
  110.         $this->productId $productId;
  111.     }
  112.     public function isPostal(): bool
  113.     {
  114.         return $this->postal;
  115.     }
  116.     public function setPostal(bool $postal): void
  117.     {
  118.         $this->postal $postal;
  119.     }
  120.     public function getValue(): ?ProductValuePriceCollection
  121.     {
  122.         return $this->value;
  123.     }
  124.     public function setValue(?ProductValuePriceCollection $value): void
  125.     {
  126.         $this->value $value;
  127.     }
  128.     public function isShippingCharge(): bool
  129.     {
  130.         return $this->shippingCharge;
  131.     }
  132.     public function setShippingCharge(bool $shippingCharge): void
  133.     {
  134.         $this->shippingCharge $shippingCharge;
  135.     }
  136.     public function isExcludeFromShippingCosts(): bool
  137.     {
  138.         return $this->excludeFromShippingCosts;
  139.     }
  140.     public function setExcludeFromShippingCosts(bool $excludeFromShippingCosts): void
  141.     {
  142.         $this->excludeFromShippingCosts $excludeFromShippingCosts;
  143.     }
  144.     public function isNoDeliveryCharge(): bool
  145.     {
  146.         return $this->noDeliveryCharge;
  147.     }
  148.     public function setNoDeliveryCharge(bool $noDeliveryCharge): void
  149.     {
  150.         $this->noDeliveryCharge $noDeliveryCharge;
  151.     }
  152.     public function isCustomerGroupCharge(): bool
  153.     {
  154.         return $this->customerGroupCharge;
  155.     }
  156.     public function setCustomerGroupCharge(bool $customerGroupCharge): void
  157.     {
  158.         $this->customerGroupCharge $customerGroupCharge;
  159.     }
  160.     public function getComment(): ?string
  161.     {
  162.         return $this->comment;
  163.     }
  164.     public function setComment(?string $comment): void
  165.     {
  166.         $this->comment $comment;
  167.     }
  168.     public function getOrderPositionNumber(): string
  169.     {
  170.         return $this->orderPositionNumber;
  171.     }
  172.     public function setOrderPositionNumber(string $orderPositionNumber): void
  173.     {
  174.         $this->orderPositionNumber $orderPositionNumber;
  175.     }
  176.     public function getTax(): ?TaxEntity
  177.     {
  178.         return $this->tax;
  179.     }
  180.     public function setTax(?TaxEntity $tax): void
  181.     {
  182.         $this->tax $tax;
  183.     }
  184.     public function getTaxId(): ?string
  185.     {
  186.         return $this->taxId;
  187.     }
  188.     public function setTaxId(?string $taxId): void
  189.     {
  190.         $this->taxId $taxId;
  191.     }
  192.     public function setTranslations(EasyCouponProductTranslationCollection $translations): self
  193.     {
  194.         $this->translations $translations;
  195.         return $this;
  196.     }
  197.     public function getTranslations(): ?EasyCouponProductTranslationCollection
  198.     {
  199.         return $this->translations;
  200.     }
  201.     public function getTitle(): string
  202.     {
  203.         return $this->title;
  204.     }
  205.     public function setTitle(string $title): void
  206.     {
  207.         $this->title $title;
  208.     }
  209.     /**
  210.      * @return ConditionCollection|null
  211.      */
  212.     public function getConditions(): ?ConditionCollection
  213.     {
  214.         return $this->conditions;
  215.     }
  216.     /**
  217.      * @param ConditionCollection|null $conditions
  218.      */
  219.     public function setConditions(?ConditionCollection $conditions): void
  220.     {
  221.         $this->conditions $conditions;
  222.     }
  223.     /**
  224.      * @param bool $combineVouchers
  225.      *
  226.      * @return EasyCouponProductEntity
  227.      */
  228.     public function setCombineVouchers(bool $combineVouchers): EasyCouponProductEntity
  229.     {
  230.         $this->combineVouchers $combineVouchers;
  231.         return $this;
  232.     }
  233.     /**
  234.      * @return bool
  235.      */
  236.     public function isCombineVouchers(): bool
  237.     {
  238.         return $this->combineVouchers;
  239.     }
  240.     /**
  241.      * @return int|null
  242.      */
  243.     public function getValidityTime(): ?int
  244.     {
  245.         return $this->validityTime;
  246.     }
  247.     /**
  248.      * @param int|null $validityTime
  249.      */
  250.     public function setValidityTime(?int $validityTime): void
  251.     {
  252.         $this->validityTime $validityTime;
  253.     }
  254.     /**
  255.      * @return bool
  256.      */
  257.     public function isValidityByEndOfYear(): bool
  258.     {
  259.         return $this->validityByEndOfYear ?? false;
  260.     }
  261.     /**
  262.      * @param bool $validityByEndOfYear
  263.      */
  264.     public function setValidityByEndOfYear(bool $validityByEndOfYear): void
  265.     {
  266.         $this->validityByEndOfYear $validityByEndOfYear;
  267.     }
  268.     public function isReduceShippingCosts(): bool
  269.     {
  270.         return $this->reduceShippingCosts;
  271.     }
  272.     public function setReduceShippingCosts(bool $reduceShippingCosts): EasyCouponProductEntity
  273.     {
  274.         $this->reduceShippingCosts $reduceShippingCosts;
  275.         return $this;
  276.     }
  277.     /**
  278.      * @return bool
  279.      */
  280.     public function isRecipientInputEnabled(): bool
  281.     {
  282.         return $this->recipientInputEnabled;
  283.     }
  284.     /**
  285.      * @param bool $recipientInputEnabled
  286.      */
  287.     public function setRecipientInputEnabled(bool $recipientInputEnabled): void
  288.     {
  289.         $this->recipientInputEnabled $recipientInputEnabled;
  290.     }
  291.     public function isRequestedDeliveryEnabled(): bool
  292.     {
  293.         return $this->requestedDeliveryEnabled;
  294.     }
  295.     public function setRequestedDeliveryEnabled(bool $requestedDeliveryEnabled): void
  296.     {
  297.         $this->requestedDeliveryEnabled $requestedDeliveryEnabled;
  298.     }
  299.     public function isDeliveryMessageEnabled(): bool
  300.     {
  301.         return $this->deliveryMessageEnabled;
  302.     }
  303.     public function setDeliveryMessageEnabled(bool $deliveryMessageEnabled): void
  304.     {
  305.         $this->deliveryMessageEnabled $deliveryMessageEnabled;
  306.     }
  307. }