選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

OrderReductionCartModel.php 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. }