app/Customize/Entity/ConfirmDelivery.php line 24

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\ConfirmDelivery')) {
  15. /**
  16. * StepOption
  17. * @ORM\Table(name="dtb_confirm_delivery")
  18. * @ORM\Entity(repositoryClass="Customize\Repository\ConfirmDeliveryRepository")
  19. */
  20. class ConfirmDelivery extends \Eccube\Entity\AbstractEntity
  21. {
  22. /**
  23. * @var integer
  24. *
  25. * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  26. * @ORM\Id
  27. * @ORM\GeneratedValue(strategy="IDENTITY")
  28. */
  29. private $id;
  30. /**
  31. * @var string
  32. *
  33. * @ORM\Column(name="option_ids", type="string", nullable=true, length=255)
  34. * @ORM\GeneratedValue(strategy="NONE")
  35. */
  36. private $option_ids;
  37. /**
  38. * @var int
  39. *
  40. * @ORM\Column(name="product_id", type="integer", nullable=false, options={"unsigned":true})
  41. * @ORM\GeneratedValue(strategy="NONE")
  42. */
  43. private $product_id;
  44. public function setId($id)
  45. {
  46. $this->id = $id;
  47. return $this;
  48. }
  49. public function getId()
  50. {
  51. return $this->id;
  52. }
  53. public function getOptionIdArray()
  54. {
  55. preg_match_all('!\d+!', trim($this->option_ids), $optionIds);
  56. return $optionIds[0];
  57. }
  58. public function setOptionIds($option_ids)
  59. {
  60. $this->option_ids = $option_ids;
  61. return $this;
  62. }
  63. public function getOptionIds()
  64. {
  65. return $this->option_ids;
  66. }
  67. public function setProductId($product_id)
  68. {
  69. $this->product_id = $product_id;
  70. return $this;
  71. }
  72. public function getProductId()
  73. {
  74. return $this->product_id;
  75. }
  76. }
  77. }