app/Plugin/ScheduleDx/Entity/ScheduleTime.php line 16

Open in your IDE?
  1. <?php
  2. namespace Plugin\ScheduleDx\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Plugin\ScheduleDx\Entity\Extend\ScheduleTimeTrait;
  6. /**
  7.  * PlgScheduleTime
  8.  *
  9.  * @ORM\Table(name="plg_schedule_time")
  10.  * @ORM\HasLifecycleCallbacks()
  11.  * @ORM\Entity(repositoryClass="Plugin\ScheduleDx\Repository\ScheduleTimeRepository")
  12.  */
  13. class ScheduleTime extends \Eccube\Entity\AbstractEntity
  14. {
  15.     use ScheduleTimeTrait;
  16.     const PRODUCT_TYPE 1;
  17.     const CATEGORY_TYPE 2;
  18.     const PAGE_TYPE 3;
  19.     const BLOCK_TYPE 4;
  20.     const PRODUCT_TIME_ONLY_TYPE 6;
  21.     public function __construct()
  22.     {
  23.         // 初期値設定
  24.         $this->viewFlg false;
  25.         $this->timeViewFlg false;
  26.     }
  27.     /**
  28.      * @var int
  29.      *
  30.      * @ORM\Column(name="schedule_time_id", type="integer")
  31.      * @ORM\Id
  32.      * @ORM\GeneratedValue(strategy="IDENTITY")
  33.      */
  34.     private $id;
  35.     /**
  36.      * @var int
  37.      *
  38.      * @ORM\Column(name="schedule_type", type="integer", nullable=false)
  39.      */
  40.     private $scheduleType;
  41.     /**
  42.      * @var \DateTime|null
  43.      *
  44.      * @ORM\Column(name="time_from", type="datetime", nullable=true)
  45.      */
  46.     private $timeFrom;
  47.     /**
  48.      * @var \DateTime|null
  49.      *
  50.      * @ORM\Column(name="time_to", type="datetime", nullable=true)
  51.      */
  52.     private $timeTo;
  53.     /**
  54.      * @var string
  55.      *
  56.      * @ORM\Column(name="time_only_from", type="string", nullable=true)
  57.      */
  58.     private $timeOnlyFrom;
  59.     /**
  60.      * @var string
  61.      *
  62.      * @ORM\Column(name="time_only_to", type="string", nullable=true)
  63.      */
  64.     private $timeOnlyTo;
  65.     /**
  66.      * @var bool
  67.      *
  68.      * @ORM\Column(name="view_flg", type="boolean", options={"default":false})
  69.      */
  70.     private $viewFlg;
  71.     /**
  72.      * @var bool
  73.      * @ORM\Column(name="time_view_flg", type="boolean", options={"default":false})
  74.      */
  75.     private $timeViewFlg;
  76.     /**
  77.      * @var \DateTime|null
  78.      *
  79.      * @ORM\Column(name="create_date", type="datetime", nullable=true)
  80.      */
  81.     private $createDate;
  82.     /**
  83.      * @var \DateTime|null
  84.      *
  85.      * @ORM\Column(name="update_date", type="datetime", nullable=true)
  86.      */
  87.     private $updateDate;
  88.     /**
  89.      * @var \Plugin\ScheduleDx\Entity\ScheduleTime
  90.      *
  91.      * @ORM\ManyToOne(targetEntity="Plugin\ScheduleDx\Entity\ScheduleTime")
  92.      * @ORM\JoinColumns({
  93.      *   @ORM\JoinColumn(name="chain_schedule_time_id", referencedColumnName="schedule_time_id")
  94.      * })
  95.      */
  96.     private $ChainScheduleTime;
  97.     /**
  98.      * @return int
  99.      */
  100.     public function getId()
  101.     {
  102.         return $this->id;
  103.     }
  104.     /**
  105.      * @return int
  106.      */
  107.     public function getScheduleType(): ?int
  108.     {
  109.         return $this->scheduleType;
  110.     }
  111.     /**
  112.      * @param int $scheduleType
  113.      * @return ScheduleTime
  114.      */
  115.     public function setScheduleType(int $scheduleType)
  116.     {
  117.         $this->scheduleType $scheduleType;
  118.         return $this;
  119.     }
  120.     /**
  121.      * @return DateTime|null
  122.      */
  123.     public function getTimeFrom(): ?DateTime
  124.     {
  125.         return $this->timeFrom;
  126.     }
  127.     /**
  128.      * @param DateTime|null $timeFrom
  129.      * @return $this
  130.      */
  131.     public function setTimeFrom(?DateTime $timeFrom)
  132.     {
  133.         $this->timeFrom $timeFrom;
  134.         return $this;
  135.     }
  136.     /**
  137.      * @return string|null
  138.      */
  139.     public function getTimeOnlyFrom()
  140.     {
  141.         return $this->timeOnlyFrom;
  142.     }
  143.     /**
  144.      * @param string $timeOnlyFrom
  145.      * @return ScheduleTime
  146.      */
  147.     public function setTimeOnlyFrom(?string $timeOnlyFrom)
  148.     {
  149.         $this->timeOnlyFrom $timeOnlyFrom;
  150.         return $this;
  151.     }
  152.     /**
  153.      * @return string|null
  154.      */
  155.     public function getTimeOnlyTo()
  156.     {
  157.         return $this->timeOnlyTo;
  158.     }
  159.     /**
  160.      * @param string $timeOnlyTo
  161.      * @return ScheduleTime
  162.      */
  163.     public function setTimeOnlyTo(?string $timeOnlyTo)
  164.     {
  165.         $this->timeOnlyTo $timeOnlyTo;
  166.         return $this;
  167.     }
  168.     /**
  169.      * @return DateTime|null
  170.      */
  171.     public function getTimeTo(): ?DateTime
  172.     {
  173.         return $this->timeTo;
  174.     }
  175.     /**
  176.      * @param DateTime|null $timeTo
  177.      * @return $this
  178.      */
  179.     public function setTimeTo(?DateTime $timeTo)
  180.     {
  181.         $this->timeTo $timeTo;
  182.         return $this;
  183.     }
  184.     /**
  185.      * @return bool
  186.      */
  187.     public function isViewFlg(): bool
  188.     {
  189.         return $this->viewFlg;
  190.     }
  191.     /**
  192.      * @param bool $viewFlg
  193.      * @return $this
  194.      */
  195.     public function setViewFlg(bool $viewFlg)
  196.     {
  197.         $this->viewFlg $viewFlg;
  198.         return $this;
  199.     }
  200.     /**
  201.      * @return DateTime|null
  202.      */
  203.     public function getCreateDate(): ?DateTime
  204.     {
  205.         return $this->createDate;
  206.     }
  207.     /**
  208.      * @param DateTime|null $createDate
  209.      * @return $this
  210.      */
  211.     public function setCreateDate(?DateTime $createDate)
  212.     {
  213.         $this->createDate $createDate;
  214.         return $this;
  215.     }
  216.     /**
  217.      * @return DateTime|null
  218.      */
  219.     public function getUpdateDate(): ?DateTime
  220.     {
  221.         return $this->updateDate;
  222.     }
  223.     /**
  224.      * @param DateTime|null $updateDate
  225.      * @return $this
  226.      */
  227.     public function setUpdateDate(?DateTime $updateDate)
  228.     {
  229.         $this->updateDate $updateDate;
  230.         return $this;
  231.     }
  232.     /**
  233.      * @return ScheduleTime|null
  234.      */
  235.     public function getChainScheduleTime(): ?ScheduleTime
  236.     {
  237.         return $this->ChainScheduleTime;
  238.     }
  239.     /**
  240.      * @param ScheduleTime $ChainScheduleTime
  241.      * @return ScheduleTime
  242.      */
  243.     public function setChainScheduleTime(?ScheduleTime $ChainScheduleTime): ScheduleTime
  244.     {
  245.         $this->ChainScheduleTime $ChainScheduleTime;
  246.         return $this;
  247.     }
  248.     /**
  249.      * @return bool
  250.      */
  251.     public function isTimeViewFlg()
  252.     {
  253.         return $this->timeViewFlg;
  254.     }
  255.     /**
  256.      * @param bool $timeViewFlg
  257.      * @return $this
  258.      */
  259.     public function setTimeViewFlg($timeViewFlg)
  260.     {
  261.         $this->timeViewFlg $timeViewFlg;
  262.         return $this;
  263.     }
  264. }