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.

OrderReductionCredit.php 2.0KB

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