77 lines
1.6KB

  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Lc\ShopBundle\Context\ReductionInterface;
  7. use Lc\ShopBundle\Model\AbstractDocumentEntity;
  8. use Lc\ShopBundle\Model\ReductionPropertyTrait;
  9. use Lc\ShopBundle\Model\ReductionTrait;
  10. /**
  11. * @ORM\MappedSuperclass()
  12. */
  13. abstract class ReductionCart extends AbstractDocumentEntity
  14. {
  15. use ReductionTrait;
  16. use ReductionPropertyTrait ;
  17. /**
  18. * @ORM\Column(type="boolean", nullable=true)
  19. */
  20. protected $freeShipping;
  21. /**
  22. * @ORM\Column(type="string", length=25)
  23. */
  24. protected $appliedTo;
  25. /**
  26. * @ORM\Column(type="integer")
  27. */
  28. protected $priority;
  29. public function getFreeShipping(): ?bool
  30. {
  31. return $this->freeShipping;
  32. }
  33. public function setFreeShipping(?bool $freeShipping): self
  34. {
  35. $this->freeShipping = $freeShipping;
  36. return $this;
  37. }
  38. public function getAppliedTo(): ?string
  39. {
  40. return $this->appliedTo;
  41. }
  42. public function setAppliedTo(string $appliedTo): self
  43. {
  44. $this->appliedTo = $appliedTo;
  45. return $this;
  46. }
  47. public function getPriority(): ?int
  48. {
  49. return $this->priority;
  50. }
  51. public function setPriority(int $priority): self
  52. {
  53. $this->priority = $priority;
  54. return $this;
  55. }
  56. }