Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use App\Entity\OrderPayment;
  4. use App\Entity\OrderRefund;
  5. use App\Entity\UserMerchant;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Lc\ShopBundle\Context\OrderPaymentInterface;
  8. use Lc\ShopBundle\Context\OrderRefundInterface;
  9. use Lc\ShopBundle\Context\UserMerchantInterface;
  10. /**
  11. * @ORM\MappedSuperclass()
  12. */
  13. abstract class CreditHistory extends AbstractEntity
  14. {
  15. /**
  16. * @ORM\Column(type="float")
  17. */
  18. protected $amount;
  19. /**
  20. * @ORM\Column(type="string", length=31)
  21. */
  22. protected $meanPayment;
  23. /**
  24. * @ORM\Column(type="text", nullable=true)
  25. */
  26. protected $comment;
  27. /**
  28. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserMerchantInterface", inversedBy="creditHistories")
  29. * @ORM\JoinColumn(nullable=false)
  30. */
  31. protected $userMerchant;
  32. /**
  33. * @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\OrderPaymentInterface", cascade={"persist", "remove"})
  34. */
  35. protected $orderPayment;
  36. /**
  37. * @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\OrderRefundInterface", cascade={"persist", "remove"})
  38. */
  39. protected $orderRefund;
  40. public function getAmount(): ?float
  41. {
  42. return $this->amount;
  43. }
  44. public function setAmount(float $amount): self
  45. {
  46. $this->amount = $amount;
  47. return $this;
  48. }
  49. public function getMeanPayment(): ?string
  50. {
  51. return $this->meanPayment;
  52. }
  53. public function setMeanPayment(string $meanPayment): self
  54. {
  55. $this->meanPayment = $meanPayment;
  56. return $this;
  57. }
  58. public function getComment(): ?string
  59. {
  60. return $this->comment;
  61. }
  62. public function setComment(string $comment): self
  63. {
  64. $this->comment = $comment;
  65. return $this;
  66. }
  67. public function getUserMerchant(): ?UserMerchantInterface
  68. {
  69. return $this->userMerchant;
  70. }
  71. public function setUserMerchant(?UserMerchantInterface $userMerchant): self
  72. {
  73. $this->userMerchant = $userMerchant;
  74. return $this;
  75. }
  76. public function getOrderPayment(): ?OrderPaymentInterface
  77. {
  78. return $this->orderPayment;
  79. }
  80. public function setOrderPayment(?OrderPaymentInterface $orderPayment): self
  81. {
  82. $this->orderPayment = $orderPayment;
  83. return $this;
  84. }
  85. public function getOrderRefund(): ?OrderRefundInterface
  86. {
  87. return $this->orderRefund;
  88. }
  89. public function setOrderRefund(?OrderRefundInterface $orderRefund): self
  90. {
  91. $this->orderRefund = $orderRefund;
  92. return $this;
  93. }
  94. }