src/Eccube/Entity/DeliveryFee.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\DeliveryFee')) {
  15. /**
  16. * DeliveryFee
  17. *
  18. * @ORM\Table(name="dtb_delivery_fee")
  19. * @ORM\InheritanceType("SINGLE_TABLE")
  20. * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21. * @ORM\HasLifecycleCallbacks()
  22. * @ORM\Entity(repositoryClass="Eccube\Repository\DeliveryFeeRepository")
  23. */
  24. class DeliveryFee extends \Eccube\Entity\AbstractEntity
  25. {
  26. /**
  27. * @var int
  28. *
  29. * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  30. * @ORM\Id
  31. * @ORM\GeneratedValue(strategy="IDENTITY")
  32. */
  33. private $id;
  34. /**
  35. * @var string
  36. *
  37. * @ORM\Column(name="fee", type="decimal", precision=12, scale=2, options={"unsigned":true})
  38. */
  39. private $fee;
  40. /**
  41. * @var \Eccube\Entity\Delivery
  42. *
  43. * @ORM\ManyToOne(targetEntity="Eccube\Entity\Delivery", inversedBy="DeliveryFees")
  44. * @ORM\JoinColumns({
  45. * @ORM\JoinColumn(name="delivery_id", referencedColumnName="id")
  46. * })
  47. */
  48. private $Delivery;
  49. /**
  50. * @var \Eccube\Entity\Master\Pref
  51. *
  52. * @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\Pref")
  53. * @ORM\JoinColumns({
  54. * @ORM\JoinColumn(name="pref_id", referencedColumnName="id")
  55. * })
  56. */
  57. private $Pref;
  58. /**
  59. * Get id.
  60. *
  61. * @return int
  62. */
  63. public function getId()
  64. {
  65. return $this->id;
  66. }
  67. /**
  68. * Set fee.
  69. *
  70. * @param string $fee
  71. *
  72. * @return DeliveryFee
  73. */
  74. public function setFee($fee)
  75. {
  76. $this->fee = $fee;
  77. return $this;
  78. }
  79. /**
  80. * Get fee.
  81. *
  82. * @return string
  83. */
  84. public function getFee()
  85. {
  86. return $this->fee;
  87. }
  88. /**
  89. * Set delivery.
  90. *
  91. * @param \Eccube\Entity\Delivery|null $delivery
  92. *
  93. * @return DeliveryFee
  94. */
  95. public function setDelivery(Delivery $delivery = null)
  96. {
  97. $this->Delivery = $delivery;
  98. return $this;
  99. }
  100. /**
  101. * Get delivery.
  102. *
  103. * @return \Eccube\Entity\Delivery|null
  104. */
  105. public function getDelivery()
  106. {
  107. return $this->Delivery;
  108. }
  109. /**
  110. * Set pref.
  111. *
  112. * @param \Eccube\Entity\Master\Pref|null $pref
  113. *
  114. * @return DeliveryFee
  115. */
  116. public function setPref(Master\Pref $pref = null)
  117. {
  118. $this->Pref = $pref;
  119. return $this;
  120. }
  121. /**
  122. * Get pref.
  123. *
  124. * @return \Eccube\Entity\Master\Pref|null
  125. */
  126. public function getPref()
  127. {
  128. return $this->Pref;
  129. }
  130. }
  131. }