Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

OrderReductionCreditModel.php 1.9KB

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