135 Zeilen
2.9KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use App\Entity\OrderShop;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\MappedSuperclass()
  7. */
  8. abstract class CreditHistory extends AbstractEntity
  9. {
  10. /**
  11. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface")
  12. * @ORM\JoinColumn(nullable=false)
  13. */
  14. protected $merchant;
  15. /**
  16. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="creditHistories")
  17. * @ORM\JoinColumn(nullable=false)
  18. */
  19. protected $user;
  20. /**
  21. * @ORM\Column(type="float")
  22. */
  23. protected $amount;
  24. /**
  25. * @ORM\Column(type="string", length=31)
  26. */
  27. protected $type;
  28. /**
  29. * @ORM\Column(type="string", length=31)
  30. */
  31. protected $meanPayment;
  32. /**
  33. * @ORM\Column(type="text", nullable=true)
  34. */
  35. protected $comment;
  36. /**
  37. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="creditHistories")
  38. * @ORM\JoinColumn(nullable=false)
  39. */
  40. protected $orderShop;
  41. public function getMerchant(): ?Merchant
  42. {
  43. return $this->merchant;
  44. }
  45. public function setMerchant(?Merchant $merchant): self
  46. {
  47. $this->merchant = $merchant;
  48. return $this;
  49. }
  50. public function getUser(): ?User
  51. {
  52. return $this->user;
  53. }
  54. public function setUser(?User $user): self
  55. {
  56. $this->user = $user;
  57. return $this;
  58. }
  59. public function getAmount(): ?float
  60. {
  61. return $this->amount;
  62. }
  63. public function setAmount(float $amount): self
  64. {
  65. $this->amount = $amount;
  66. return $this;
  67. }
  68. public function getType(): ?string
  69. {
  70. return $this->type;
  71. }
  72. public function setType(string $type): self
  73. {
  74. $this->type = $type;
  75. return $this;
  76. }
  77. public function getMeanPayment(): ?string
  78. {
  79. return $this->meanPayment;
  80. }
  81. public function setMeanPayment(string $meanPayment): self
  82. {
  83. $this->meanPayment = $meanPayment;
  84. return $this;
  85. }
  86. public function getComment(): ?string
  87. {
  88. return $this->comment;
  89. }
  90. public function setComment(string $comment): self
  91. {
  92. $this->comment = $comment;
  93. return $this;
  94. }
  95. public function getOrderShop(): ?OrderShop
  96. {
  97. return $this->orderShop;
  98. }
  99. public function setOrderShop(?OrderShop $orderShop): self
  100. {
  101. $this->orderShop = $orderShop;
  102. return $this;
  103. }
  104. }