vendor/shopware/core/System/DeliveryTime/DeliveryTimeEntity.php line 13

  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\System\DeliveryTime;
  3. use Shopware\Core\Checkout\Shipping\ShippingMethodCollection;
  4. use Shopware\Core\Content\Product\ProductCollection;
  5. use Shopware\Core\Framework\DataAbstractionLayer\Entity;
  6. use Shopware\Core\Framework\DataAbstractionLayer\EntityCollection;
  7. use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait;
  8. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  9. use Shopware\Core\Framework\Log\Package;
  10. use Shopware\Core\System\DeliveryTime\Aggregate\DeliveryTimeTranslation\DeliveryTimeTranslationCollection;
  11. #[Package('checkout')]
  12. class DeliveryTimeEntity extends Entity
  13. {
  14.     use EntityCustomFieldsTrait;
  15.     use EntityIdTrait;
  16.     final public const DELIVERY_TIME_HOUR 'hour';
  17.     final public const DELIVERY_TIME_DAY 'day';
  18.     final public const DELIVERY_TIME_WEEK 'week';
  19.     final public const DELIVERY_TIME_MONTH 'month';
  20.     final public const DELIVERY_TIME_YEAR 'year';
  21.     /**
  22.      * @var string|null
  23.      */
  24.     protected $name;
  25.     /**
  26.      * @var int
  27.      */
  28.     protected $min;
  29.     /**
  30.      * @var int
  31.      */
  32.     protected $max;
  33.     /**
  34.      * @var string
  35.      */
  36.     protected $unit;
  37.     /**
  38.      * @var ShippingMethodCollection|null
  39.      */
  40.     protected $shippingMethods;
  41.     /**
  42.      * @var DeliveryTimeTranslationCollection|null
  43.      */
  44.     protected $translations;
  45.     /**
  46.      * @var ProductCollection|null
  47.      */
  48.     protected $products;
  49.     public function getName(): ?string
  50.     {
  51.         return $this->name;
  52.     }
  53.     public function setName(string $name): void
  54.     {
  55.         $this->name $name;
  56.     }
  57.     public function getMin(): int
  58.     {
  59.         return $this->min;
  60.     }
  61.     public function setMin(int $min): void
  62.     {
  63.         $this->min $min;
  64.     }
  65.     public function getMax(): int
  66.     {
  67.         return $this->max;
  68.     }
  69.     public function setMax(int $max): void
  70.     {
  71.         $this->max $max;
  72.     }
  73.     public function getUnit(): string
  74.     {
  75.         return $this->unit;
  76.     }
  77.     public function setUnit(string $unit): void
  78.     {
  79.         $this->unit $unit;
  80.     }
  81.     public function getShippingMethods(): ?ShippingMethodCollection
  82.     {
  83.         return $this->shippingMethods;
  84.     }
  85.     public function setShippingMethods(ShippingMethodCollection $shippingMethods): void
  86.     {
  87.         $this->shippingMethods $shippingMethods;
  88.     }
  89.     /**
  90.      * @return DeliveryTimeTranslationCollection|null
  91.      */
  92.     public function getTranslations(): ?EntityCollection
  93.     {
  94.         return $this->translations;
  95.     }
  96.     /**
  97.      * @param DeliveryTimeTranslationCollection $translations
  98.      */
  99.     public function setTranslations(EntityCollection $translations): void
  100.     {
  101.         $this->translations $translations;
  102.     }
  103.     public function getProducts(): ?ProductCollection
  104.     {
  105.         return $this->products;
  106.     }
  107.     public function setProducts(ProductCollection $products): void
  108.     {
  109.         $this->products $products;
  110.     }
  111. }