You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
1.9KB

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