Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

81 rinda
1.8KB

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