app/Customize/Entity/WorkingTime.php line 30

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 Customize\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  15. if (!class_exists('\Customize\Entity\WorkingTime')) {
  16. /**
  17. * WorkingTime
  18. *
  19. * @ORM\Table(name="dtb_working_time")
  20. * @ORM\InheritanceType("SINGLE_TABLE")
  21. * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  22. * @ORM\HasLifecycleCallbacks()
  23. * @ORM\Entity(repositoryClass="Customize\Repository\WorkingTimeRepository")
  24. * @UniqueEntity(fields={"day"}, message="この日付はすでに存在します。別の日付を選択してください")
  25. */
  26. class WorkingTime extends \Eccube\Entity\AbstractEntity
  27. {
  28. /**
  29. * @var integer
  30. *
  31. * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  32. * @ORM\Id
  33. * @ORM\GeneratedValue(strategy="IDENTITY")
  34. */
  35. private $id;
  36. /**
  37. * @var \DateTime
  38. *
  39. * @ORM\Column(name="day", type="date", options={"unique":true})
  40. */
  41. private $day;
  42. /**
  43. * @var boolean
  44. *
  45. * @ORM\Column(name="status", type="boolean", options={"default":false})
  46. */
  47. private $status;
  48. /**
  49. * @var \DateTime
  50. *
  51. * @ORM\Column(name="create_date", type="datetimetz")
  52. */
  53. private $create_date;
  54. /**
  55. * @var \DateTime
  56. *
  57. * @ORM\Column(name="update_date", type="datetimetz")
  58. */
  59. private $update_date;
  60. /**
  61. * Set id.
  62. *
  63. * @param int $id
  64. *
  65. * @return Campaign
  66. */
  67. public function setId($id)
  68. {
  69. $this->id = $id;
  70. return $this;
  71. }
  72. /**
  73. * Get Id.
  74. *
  75. * @return int
  76. */
  77. public function getId()
  78. {
  79. return $this->id;
  80. }
  81. /**
  82. * Set day.
  83. *
  84. * @param string $day
  85. *
  86. * @return Calendar
  87. */
  88. public function setDay($day)
  89. {
  90. $this->day = $day;
  91. return $this;
  92. }
  93. /**
  94. * Get day.
  95. *
  96. * @return string
  97. */
  98. public function getDay()
  99. {
  100. return $this->day;
  101. }
  102. /**
  103. * Set status.
  104. *
  105. * @param string $status
  106. *
  107. * @return Calendar
  108. */
  109. public function setStatus($status)
  110. {
  111. $this->status = $status;
  112. return $this;
  113. }
  114. /**
  115. * Get status.
  116. *
  117. * @return string
  118. */
  119. public function getStatus()
  120. {
  121. return $this->status;
  122. }
  123. /**
  124. * Set createDate.
  125. *
  126. * @param \DateTime $createDate
  127. *
  128. * @return Calendar
  129. */
  130. public function setCreateDate($createDate)
  131. {
  132. $this->create_date = $createDate;
  133. return $this;
  134. }
  135. /**
  136. * Get createDate.
  137. *
  138. * @return \DateTime
  139. */
  140. public function getCreateDate()
  141. {
  142. return $this->create_date;
  143. }
  144. /**
  145. * Set updateDate.
  146. *
  147. * @param \DateTime $updateDate
  148. *
  149. * @return Calendar
  150. */
  151. public function setUpdateDate($updateDate)
  152. {
  153. $this->update_date = $updateDate;
  154. return $this;
  155. }
  156. /**
  157. * Get updateDate.
  158. *
  159. * @return \DateTime
  160. */
  161. public function getUpdateDate()
  162. {
  163. return $this->update_date;
  164. }
  165. }
  166. }