78 Zeilen
1.8KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\ShopBundle\Context\ReductionCartPropertyInterface;
  5. use Lc\ShopBundle\Context\ReductionInterface;
  6. /**
  7. * @ORM\MappedSuperclass()
  8. */
  9. abstract class OrderReductionCart implements ReductionInterface, ReductionCartPropertyInterface
  10. {
  11. use ReductionTrait;
  12. use ReductionCartPropertyTrait;
  13. /**
  14. * @ORM\Column(type="string", length=255)
  15. */
  16. protected $title;
  17. /**
  18. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="orderReductionCarts")
  19. * @ORM\JoinColumn(nullable=false)
  20. */
  21. protected $orderShop;
  22. /**
  23. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ReductionCartInterface")
  24. * @ORM\JoinColumn(nullable=false)
  25. */
  26. protected $reductionCart;
  27. public function __toString()
  28. {
  29. return $this->title;
  30. }
  31. public function getTitle(): ?string
  32. {
  33. return $this->title;
  34. }
  35. public function setTitle(string $title): self
  36. {
  37. $this->title = $title;
  38. return $this;
  39. }
  40. public function getOrderShop(): ?OrderShop
  41. {
  42. return $this->orderShop;
  43. }
  44. public function setOrderShop(?OrderShop $orderShop): self
  45. {
  46. $this->orderShop = $orderShop;
  47. return $this;
  48. }
  49. public function getReductionCart(): ?ReductionCart
  50. {
  51. return $this->reductionCart;
  52. }
  53. public function setReductionCart(?ReductionCart $reductionCart): self
  54. {
  55. $this->reductionCart = $reductionCart;
  56. return $this;
  57. }
  58. }