app/Customize/Entity/StepOption.php line 26

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. if (!class_exists('\Customize\Entity\StepOption')) {
  15. /**
  16. * StepOption
  17. * @ORM\Table(name="dtb_step_options")
  18. * @ORM\Entity(repositoryClass="Customize\Repository\StepOptionRepository")
  19. */
  20. class StepOption extends \Eccube\Entity\AbstractEntity
  21. {
  22. /**
  23. * @var integer
  24. *
  25. * @ORM\Column(name="id", type="integer", nullable=false)
  26. * @ORM\Id
  27. */
  28. private $id;
  29. /**
  30. * @var int
  31. *
  32. * @ORM\Column(name="step_number", type="integer", nullable=true, options={"unsigned":true})
  33. * @ORM\GeneratedValue(strategy="NONE")
  34. */
  35. private $step_number;
  36. /**
  37. * @var string
  38. *
  39. * @ORM\Column(name="step_name", type="string", nullable=true, length=255)
  40. * @ORM\GeneratedValue(strategy="NONE")
  41. */
  42. private $step_name;
  43. /**
  44. * @var boolean
  45. *
  46. * @ORM\Column(name="active", type="boolean", options={"default": true})
  47. * @ORM\GeneratedValue(strategy="NONE")
  48. */
  49. private $active;
  50. /**
  51. * @var string
  52. *
  53. * @ORM\Column(name="option_text", type="string", nullable=true, length=255)
  54. * @ORM\GeneratedValue(strategy="NONE")
  55. */
  56. private $option_text;
  57. /**
  58. * @var string
  59. *
  60. * @ORM\Column(name="option_detail", type="string", nullable=true, length=500)
  61. * @ORM\GeneratedValue(strategy="NONE")
  62. */
  63. private $option_detail;
  64. /**
  65. * @var string
  66. *
  67. * @ORM\Column(name="option_tag", type="string", nullable=true, length=100)
  68. * @ORM\GeneratedValue(strategy="NONE")
  69. */
  70. private $option_tag;
  71. /**
  72. * @var string
  73. *
  74. * @ORM\Column(name="annotation", type="text", nullable=true)
  75. * @ORM\GeneratedValue(strategy="NONE")
  76. */
  77. private $annotation;
  78. /**
  79. * @var string
  80. *
  81. * @ORM\Column(name="remove_option_ids", type="string", nullable=true, length=255)
  82. * @ORM\GeneratedValue(strategy="NONE")
  83. */
  84. private $remove_option_ids;
  85. /**
  86. * @var int
  87. *
  88. * @ORM\Column(name="product_id", type="integer", nullable=true, options={"unsigned":true})
  89. * @ORM\GeneratedValue(strategy="NONE")
  90. */
  91. private $product_id;
  92. /**
  93. * @var \DateTime
  94. *
  95. * @ORM\Column(name="create_date", type="datetimetz", nullable=true)})
  96. */
  97. private $create_date;
  98. /**
  99. * @var \DateTime
  100. *
  101. * @ORM\Column(name="update_date", type="datetimetz", nullable=true)})
  102. */
  103. private $update_date;
  104. /**
  105. * @var int
  106. *
  107. * @ORM\Column(name="remove_send_data_method_id", type="integer", nullable=true)})
  108. */
  109. private $remove_send_data_method_id;
  110. /**
  111. * Get id.
  112. *
  113. * @return int
  114. */
  115. public function getId()
  116. {
  117. return $this->id;
  118. }
  119. /**
  120. * Get remove_option_array.
  121. *
  122. * @return array
  123. */
  124. public function getRemoveOptionArray()
  125. {
  126. if ($this->remove_option_ids) {
  127. $arr = explode(',', $this->remove_option_ids);
  128. return array_map(function ($item) {
  129. return trim($item);
  130. }, $arr);
  131. }
  132. return [];
  133. }
  134. /**
  135. * Get remove_option_ids.
  136. *
  137. * @return string
  138. */
  139. public function getRemoveOptionIds()
  140. {
  141. return $this->remove_option_ids;
  142. }
  143. /**
  144. * Get step_number.
  145. *
  146. * @return int
  147. */
  148. public function getStepNumber()
  149. {
  150. return $this->step_number;
  151. }
  152. /**
  153. * Get step_name.
  154. *
  155. * @return string
  156. */
  157. public function getStepName()
  158. {
  159. return $this->step_name;
  160. }
  161. /**
  162. * Get option_text.
  163. *
  164. * @return string
  165. */
  166. public function getOptionText()
  167. {
  168. return $this->option_text;
  169. }
  170. /**
  171. * Get option_detail.
  172. *
  173. * @return string
  174. */
  175. public function getOptionDetail()
  176. {
  177. return $this->option_detail;
  178. }
  179. /**
  180. * Get option_tag.
  181. *
  182. * @return string
  183. */
  184. public function getOptionTag()
  185. {
  186. return $this->option_tag;
  187. }
  188. /**
  189. * Get active.
  190. *
  191. * @return boolean
  192. */
  193. public function getActive()
  194. {
  195. return $this->active;
  196. }
  197. /**
  198. * Get annotation.
  199. *
  200. * @return string
  201. */
  202. public function getAnnotation()
  203. {
  204. return $this->annotation;
  205. }
  206. /**
  207. * Set step_number.
  208. *
  209. * @param int $step_number
  210. *
  211. * @return StepOption
  212. */
  213. public function setStepNumber($step_number)
  214. {
  215. $this->step_number = $step_number;
  216. return $this;
  217. }
  218. /**
  219. * Set id.
  220. *
  221. * @param int $id
  222. *
  223. * @return StepOption
  224. */
  225. public function setId($id)
  226. {
  227. $this->id = $id;
  228. return $this;
  229. }
  230. /**
  231. * Set remove_option_ids.
  232. *
  233. * @param string $remove_option_ids
  234. *
  235. * @return StepOption
  236. */
  237. public function setRemoveOptionIds($remove_option_ids)
  238. {
  239. $this->remove_option_ids = $remove_option_ids;
  240. return $this;
  241. }
  242. /**
  243. * Set step_name.
  244. *
  245. * @param string $step_name
  246. *
  247. * @return StepOption
  248. */
  249. public function setStepName($step_name)
  250. {
  251. $this->step_name = $step_name;
  252. return $this;
  253. }
  254. /**
  255. * Set option_detail.
  256. *
  257. * @param int $option_detail
  258. *
  259. * @return StepOption
  260. */
  261. public function setOptionDetail($option_detail)
  262. {
  263. $this->option_detail = $option_detail;
  264. return $this;
  265. }
  266. /**
  267. * Set option_tag.
  268. *
  269. * @param int $option_tag
  270. *
  271. * @return StepOption
  272. */
  273. public function setOptionTag($option_tag)
  274. {
  275. $this->option_tag = $option_tag;
  276. return $this;
  277. }
  278. /**
  279. * Set active.
  280. *
  281. * @param string $active
  282. *
  283. * @return StepOption
  284. */
  285. public function setActive($active)
  286. {
  287. $this->active = $active;
  288. return $this;
  289. }
  290. /**
  291. * Set option_text.
  292. *
  293. * @param string $option_text
  294. *
  295. * @return StepOption
  296. */
  297. public function setOptionText($option_text)
  298. {
  299. $this->option_text = $option_text;
  300. return $this;
  301. }
  302. /**
  303. * Set annotation.
  304. *
  305. * @param string $annotation
  306. *
  307. * @return StepOption
  308. */
  309. public function setAnnotation($annotation)
  310. {
  311. $this->annotation = $annotation;
  312. return $this;
  313. }
  314. /**
  315. * Set product_id.
  316. *
  317. * @param string $product_id
  318. *
  319. * @return StepOption
  320. */
  321. public function setProductId($product_id)
  322. {
  323. $this->product_id = $product_id;
  324. return $this;
  325. }
  326. /**
  327. * Set createDate.
  328. *
  329. * @param \DateTime $createDate
  330. *
  331. */
  332. public function setCreateDate($createDate = null)
  333. {
  334. if ($createDate) {
  335. $this->create_date = $createDate;
  336. } else {
  337. $this->create_date = date("Y-m-d H:i:s");
  338. }
  339. return $this;
  340. }
  341. /**
  342. * Get createDate.
  343. *
  344. * @return \DateTime
  345. */
  346. public function getCreateDate()
  347. {
  348. return $this->create_date;
  349. }
  350. /**
  351. * Set updateDate.
  352. *
  353. * @param \DateTime $updateDate
  354. *
  355. */
  356. public function setUpdateDate($updateDate = null)
  357. {
  358. if ($updateDate) {
  359. $this->update_date = $updateDate;
  360. } else {
  361. $this->update_date = date("Y-m-d H:i:s");
  362. }
  363. return $this;
  364. }
  365. /**
  366. * Get updateDate.
  367. *
  368. * @return \DateTime
  369. */
  370. public function getUpdateDate()
  371. {
  372. return $this->update_date;
  373. }
  374. /**
  375. * Set remove_send_data_method_id.
  376. *
  377. * @param integer $remove_send_data_method_id
  378. *
  379. */
  380. public function setRemoveSendDataMethodId($remove_send_data_method_id)
  381. {
  382. $this->remove_send_data_method_id = $remove_send_data_method_id;
  383. return $this;
  384. }
  385. /**
  386. * Get remove_send_data_method_id.
  387. *
  388. * @return integer
  389. *
  390. */
  391. public function getRemoveSendDataMethodId()
  392. {
  393. return $this->remove_send_data_method_id;
  394. }
  395. }
  396. }