src/Eccube/Entity/PaymentOption.php line 28

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of EC-CUBE
  4. *
  5. * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6. *
  7. * http://www.ec-cube.co.jp/
  8. *
  9. * For the full copyright and license information, please view the LICENSE
  10. * file that was distributed with this source code.
  11. */
  12. namespace Eccube\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14. if (!class_exists('\Eccube\Entity\PaymentOption')) {
  15. /**
  16. * PaymentOption
  17. *
  18. * @ORM\Table(name="dtb_payment_option")
  19. * @ORM\InheritanceType("SINGLE_TABLE")
  20. * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21. * @ORM\HasLifecycleCallbacks()
  22. * @ORM\Entity(repositoryClass="Eccube\Repository\PaymentOptionRepository")
  23. */
  24. class PaymentOption extends \Eccube\Entity\AbstractEntity
  25. {
  26. /**
  27. * @var int
  28. *
  29. * @ORM\Column(name="delivery_id", type="integer", options={"unsigned":true})
  30. * @ORM\Id
  31. * @ORM\GeneratedValue(strategy="NONE")
  32. */
  33. private $delivery_id;
  34. /**
  35. * @var int
  36. *
  37. * @ORM\Column(name="payment_id", type="integer", options={"unsigned":true})
  38. * @ORM\Id
  39. * @ORM\GeneratedValue(strategy="NONE")
  40. */
  41. private $payment_id;
  42. /**
  43. * @var \Eccube\Entity\Delivery
  44. *
  45. * @ORM\ManyToOne(targetEntity="Eccube\Entity\Delivery", inversedBy="PaymentOptions")
  46. * @ORM\JoinColumns({
  47. * @ORM\JoinColumn(name="delivery_id", referencedColumnName="id")
  48. * })
  49. */
  50. private $Delivery;
  51. /**
  52. * @var \Eccube\Entity\Payment
  53. *
  54. * @ORM\ManyToOne(targetEntity="Eccube\Entity\Payment", inversedBy="PaymentOptions")
  55. * @ORM\JoinColumns({
  56. * @ORM\JoinColumn(name="payment_id", referencedColumnName="id")
  57. * })
  58. */
  59. private $Payment;
  60. /**
  61. * Set deliveryId.
  62. *
  63. * @param int $deliveryId
  64. *
  65. * @return PaymentOption
  66. */
  67. public function setDeliveryId($deliveryId)
  68. {
  69. $this->delivery_id = $deliveryId;
  70. return $this;
  71. }
  72. /**
  73. * Get deliveryId.
  74. *
  75. * @return int
  76. */
  77. public function getDeliveryId()
  78. {
  79. return $this->delivery_id;
  80. }
  81. /**
  82. * Set paymentId.
  83. *
  84. * @param int $paymentId
  85. *
  86. * @return PaymentOption
  87. */
  88. public function setPaymentId($paymentId)
  89. {
  90. $this->payment_id = $paymentId;
  91. return $this;
  92. }
  93. /**
  94. * Get paymentId.
  95. *
  96. * @return int
  97. */
  98. public function getPaymentId()
  99. {
  100. return $this->payment_id;
  101. }
  102. /**
  103. * Set delivery.
  104. *
  105. * @param \Eccube\Entity\Delivery|null $delivery
  106. *
  107. * @return PaymentOption
  108. */
  109. public function setDelivery(Delivery $delivery = null)
  110. {
  111. $this->Delivery = $delivery;
  112. return $this;
  113. }
  114. /**
  115. * Get delivery.
  116. *
  117. * @return \Eccube\Entity\Delivery|null
  118. */
  119. public function getDelivery()
  120. {
  121. return $this->Delivery;
  122. }
  123. /**
  124. * Set payment.
  125. *
  126. * @param \Eccube\Entity\Payment|null $payment
  127. *
  128. * @return PaymentOption
  129. */
  130. public function setPayment(Payment $payment = null)
  131. {
  132. $this->Payment = $payment;
  133. return $this;
  134. }
  135. /**
  136. * Get payment.
  137. *
  138. * @return \Eccube\Entity\Payment|null
  139. */
  140. public function getPayment()
  141. {
  142. return $this->Payment;
  143. }
  144. }
  145. }