<?php
/*
* This file is part of EC-CUBE
*
* Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
*
* http://www.ec-cube.co.jp/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Customize\Entity;
use Doctrine\ORM\Mapping as ORM;
if (!class_exists('\Customize\Entity\StepOption')) {
/**
* StepOption
* @ORM\Table(name="dtb_step_options")
* @ORM\Entity(repositoryClass="Customize\Repository\StepOptionRepository")
*/
class StepOption extends \Eccube\Entity\AbstractEntity
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
*/
private $id;
/**
* @var int
*
* @ORM\Column(name="step_number", type="integer", nullable=true, options={"unsigned":true})
* @ORM\GeneratedValue(strategy="NONE")
*/
private $step_number;
/**
* @var string
*
* @ORM\Column(name="step_name", type="string", nullable=true, length=255)
* @ORM\GeneratedValue(strategy="NONE")
*/
private $step_name;
/**
* @var boolean
*
* @ORM\Column(name="active", type="boolean", options={"default": true})
* @ORM\GeneratedValue(strategy="NONE")
*/
private $active;
/**
* @var string
*
* @ORM\Column(name="option_text", type="string", nullable=true, length=255)
* @ORM\GeneratedValue(strategy="NONE")
*/
private $option_text;
/**
* @var string
*
* @ORM\Column(name="option_detail", type="string", nullable=true, length=500)
* @ORM\GeneratedValue(strategy="NONE")
*/
private $option_detail;
/**
* @var string
*
* @ORM\Column(name="option_tag", type="string", nullable=true, length=100)
* @ORM\GeneratedValue(strategy="NONE")
*/
private $option_tag;
/**
* @var string
*
* @ORM\Column(name="annotation", type="text", nullable=true)
* @ORM\GeneratedValue(strategy="NONE")
*/
private $annotation;
/**
* @var string
*
* @ORM\Column(name="remove_option_ids", type="string", nullable=true, length=255)
* @ORM\GeneratedValue(strategy="NONE")
*/
private $remove_option_ids;
/**
* @var int
*
* @ORM\Column(name="product_id", type="integer", nullable=true, options={"unsigned":true})
* @ORM\GeneratedValue(strategy="NONE")
*/
private $product_id;
/**
* @var \DateTime
*
* @ORM\Column(name="create_date", type="datetimetz", nullable=true)})
*/
private $create_date;
/**
* @var \DateTime
*
* @ORM\Column(name="update_date", type="datetimetz", nullable=true)})
*/
private $update_date;
/**
* @var int
*
* @ORM\Column(name="remove_send_data_method_id", type="integer", nullable=true)})
*/
private $remove_send_data_method_id;
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Get remove_option_array.
*
* @return array
*/
public function getRemoveOptionArray()
{
if ($this->remove_option_ids) {
$arr = explode(',', $this->remove_option_ids);
return array_map(function ($item) {
return trim($item);
}, $arr);
}
return [];
}
/**
* Get remove_option_ids.
*
* @return string
*/
public function getRemoveOptionIds()
{
return $this->remove_option_ids;
}
/**
* Get step_number.
*
* @return int
*/
public function getStepNumber()
{
return $this->step_number;
}
/**
* Get step_name.
*
* @return string
*/
public function getStepName()
{
return $this->step_name;
}
/**
* Get option_text.
*
* @return string
*/
public function getOptionText()
{
return $this->option_text;
}
/**
* Get option_detail.
*
* @return string
*/
public function getOptionDetail()
{
return $this->option_detail;
}
/**
* Get option_tag.
*
* @return string
*/
public function getOptionTag()
{
return $this->option_tag;
}
/**
* Get active.
*
* @return boolean
*/
public function getActive()
{
return $this->active;
}
/**
* Get annotation.
*
* @return string
*/
public function getAnnotation()
{
return $this->annotation;
}
/**
* Set step_number.
*
* @param int $step_number
*
* @return StepOption
*/
public function setStepNumber($step_number)
{
$this->step_number = $step_number;
return $this;
}
/**
* Set id.
*
* @param int $id
*
* @return StepOption
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Set remove_option_ids.
*
* @param string $remove_option_ids
*
* @return StepOption
*/
public function setRemoveOptionIds($remove_option_ids)
{
$this->remove_option_ids = $remove_option_ids;
return $this;
}
/**
* Set step_name.
*
* @param string $step_name
*
* @return StepOption
*/
public function setStepName($step_name)
{
$this->step_name = $step_name;
return $this;
}
/**
* Set option_detail.
*
* @param int $option_detail
*
* @return StepOption
*/
public function setOptionDetail($option_detail)
{
$this->option_detail = $option_detail;
return $this;
}
/**
* Set option_tag.
*
* @param int $option_tag
*
* @return StepOption
*/
public function setOptionTag($option_tag)
{
$this->option_tag = $option_tag;
return $this;
}
/**
* Set active.
*
* @param string $active
*
* @return StepOption
*/
public function setActive($active)
{
$this->active = $active;
return $this;
}
/**
* Set option_text.
*
* @param string $option_text
*
* @return StepOption
*/
public function setOptionText($option_text)
{
$this->option_text = $option_text;
return $this;
}
/**
* Set annotation.
*
* @param string $annotation
*
* @return StepOption
*/
public function setAnnotation($annotation)
{
$this->annotation = $annotation;
return $this;
}
/**
* Set product_id.
*
* @param string $product_id
*
* @return StepOption
*/
public function setProductId($product_id)
{
$this->product_id = $product_id;
return $this;
}
/**
* Set createDate.
*
* @param \DateTime $createDate
*
*/
public function setCreateDate($createDate = null)
{
if ($createDate) {
$this->create_date = $createDate;
} else {
$this->create_date = date("Y-m-d H:i:s");
}
return $this;
}
/**
* Get createDate.
*
* @return \DateTime
*/
public function getCreateDate()
{
return $this->create_date;
}
/**
* Set updateDate.
*
* @param \DateTime $updateDate
*
*/
public function setUpdateDate($updateDate = null)
{
if ($updateDate) {
$this->update_date = $updateDate;
} else {
$this->update_date = date("Y-m-d H:i:s");
}
return $this;
}
/**
* Get updateDate.
*
* @return \DateTime
*/
public function getUpdateDate()
{
return $this->update_date;
}
/**
* Set remove_send_data_method_id.
*
* @param integer $remove_send_data_method_id
*
*/
public function setRemoveSendDataMethodId($remove_send_data_method_id)
{
$this->remove_send_data_method_id = $remove_send_data_method_id;
return $this;
}
/**
* Get remove_send_data_method_id.
*
* @return integer
*
*/
public function getRemoveSendDataMethodId()
{
return $this->remove_send_data_method_id;
}
}
}