Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

OrderReductionCartModel.php 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. /**
  31. * @ORM\Column(type="string", length=255, nullable=true)
  32. */
  33. protected $codeUsed;
  34. public function __toString()
  35. {
  36. return $this->title;
  37. }
  38. public function getTitle(): ?string
  39. {
  40. return $this->title;
  41. }
  42. public function setTitle(string $title): self
  43. {
  44. $this->title = $title;
  45. return $this;
  46. }
  47. public function getOrderShop(): ?OrderShopInterface
  48. {
  49. return $this->orderShop;
  50. }
  51. public function setOrderShop(?OrderShopInterface $orderShop): self
  52. {
  53. $this->orderShop = $orderShop;
  54. return $this;
  55. }
  56. public function getReductionCart(): ?ReductionCartInterface
  57. {
  58. return $this->reductionCart;
  59. }
  60. public function setReductionCart(?ReductionCartInterface $reductionCart): self
  61. {
  62. $this->reductionCart = $reductionCart;
  63. return $this;
  64. }
  65. public function getCodeUsed(): ?string
  66. {
  67. return $this->codeUsed;
  68. }
  69. public function setCodeUsed(?string $codeUsed): self
  70. {
  71. $this->codeUsed = $codeUsed;
  72. return $this;
  73. }
  74. }