src/Eccube/Entity/DeliveryTime.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\DeliveryTime')) {
  15. /**
  16. * DeliveryTime
  17. *
  18. * @ORM\Table(name="dtb_delivery_time")
  19. * @ORM\InheritanceType("SINGLE_TABLE")
  20. * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  21. * @ORM\HasLifecycleCallbacks()
  22. * @ORM\Entity(repositoryClass="Eccube\Repository\DeliveryTimeRepository")
  23. */
  24. class DeliveryTime extends \Eccube\Entity\AbstractEntity
  25. {
  26. public function __toString()
  27. {
  28. return (string) $this->delivery_time;
  29. }
  30. /**
  31. * @var int
  32. *
  33. * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  34. * @ORM\Id
  35. * @ORM\GeneratedValue(strategy="IDENTITY")
  36. */
  37. private $id;
  38. /**
  39. * @var string
  40. *
  41. * @ORM\Column(name="delivery_time", type="string", length=255)
  42. */
  43. private $delivery_time;
  44. /**
  45. * @var \Eccube\Entity\Delivery
  46. *
  47. * @ORM\ManyToOne(targetEntity="Eccube\Entity\Delivery", inversedBy="DeliveryTimes")
  48. * @ORM\JoinColumns({
  49. * @ORM\JoinColumn(name="delivery_id", referencedColumnName="id")
  50. * })
  51. */
  52. private $Delivery;
  53. /**
  54. * @var int
  55. *
  56. * @ORM\Column(name="sort_no", type="smallint", options={"unsigned":true})
  57. */
  58. protected $sort_no;
  59. /**
  60. * @var boolean
  61. *
  62. * @ORM\Column(name="visible", type="boolean", options={"default":true})
  63. */
  64. private $visible;
  65. /**
  66. * @var \DateTime
  67. *
  68. * @ORM\Column(name="create_date", type="datetimetz")
  69. */
  70. private $create_date;
  71. /**
  72. * @var \DateTime
  73. *
  74. * @ORM\Column(name="update_date", type="datetimetz")
  75. */
  76. private $update_date;
  77. /**
  78. * Get id.
  79. *
  80. * @return int
  81. */
  82. public function getId()
  83. {
  84. return $this->id;
  85. }
  86. /**
  87. * Set deliveryTime.
  88. *
  89. * @param string $deliveryTime
  90. *
  91. * @return DeliveryTime
  92. */
  93. public function setDeliveryTime($deliveryTime)
  94. {
  95. $this->delivery_time = $deliveryTime;
  96. return $this;
  97. }
  98. /**
  99. * Get deliveryTime.
  100. *
  101. * @return string
  102. */
  103. public function getDeliveryTime()
  104. {
  105. return $this->delivery_time;
  106. }
  107. /**
  108. * Set delivery.
  109. *
  110. * @param \Eccube\Entity\Delivery|null $delivery
  111. *
  112. * @return DeliveryTime
  113. */
  114. public function setDelivery(Delivery $delivery = null)
  115. {
  116. $this->Delivery = $delivery;
  117. return $this;
  118. }
  119. /**
  120. * Get delivery.
  121. *
  122. * @return \Eccube\Entity\Delivery|null
  123. */
  124. public function getDelivery()
  125. {
  126. return $this->Delivery;
  127. }
  128. /**
  129. * Set sort_no.
  130. *
  131. * @param int $sort_no
  132. *
  133. * @return $this
  134. */
  135. public function setSortNo($sort_no)
  136. {
  137. $this->sort_no = $sort_no;
  138. return $this;
  139. }
  140. /**
  141. * Get sort_no.
  142. *
  143. * @return int
  144. */
  145. public function getSortNo()
  146. {
  147. return $this->sort_no;
  148. }
  149. /**
  150. * Set visible
  151. *
  152. * @param boolean $visible
  153. *
  154. * @return DeliveryTime
  155. */
  156. public function setVisible($visible)
  157. {
  158. $this->visible = $visible;
  159. return $this;
  160. }
  161. /**
  162. * Is the visibility visible?
  163. *
  164. * @return boolean
  165. */
  166. public function isVisible()
  167. {
  168. return $this->visible;
  169. }
  170. /**
  171. * Set createDate.
  172. *
  173. * @param \DateTime $createDate
  174. *
  175. * @return DeliveryTime
  176. */
  177. public function setCreateDate($createDate)
  178. {
  179. $this->create_date = $createDate;
  180. return $this;
  181. }
  182. /**
  183. * Get createDate.
  184. *
  185. * @return \DateTime
  186. */
  187. public function getCreateDate()
  188. {
  189. return $this->create_date;
  190. }
  191. /**
  192. * Set updateDate.
  193. *
  194. * @param \DateTime $updateDate
  195. *
  196. * @return DeliveryTime
  197. */
  198. public function setUpdateDate($updateDate)
  199. {
  200. $this->update_date = $updateDate;
  201. return $this;
  202. }
  203. /**
  204. * Get updateDate.
  205. *
  206. * @return \DateTime
  207. */
  208. public function getUpdateDate()
  209. {
  210. return $this->update_date;
  211. }
  212. }
  213. }