<?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;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
if (!class_exists('\Customize\Entity\WorkingTime')) {
/**
* WorkingTime
*
* @ORM\Table(name="dtb_working_time")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Customize\Repository\WorkingTimeRepository")
* @UniqueEntity(fields={"day"}, message="この日付はすでに存在します。別の日付を選択してください")
*/
class WorkingTime extends \Eccube\Entity\AbstractEntity
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", options={"unsigned":true})
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var \DateTime
*
* @ORM\Column(name="day", type="date", options={"unique":true})
*/
private $day;
/**
* @var boolean
*
* @ORM\Column(name="status", type="boolean", options={"default":false})
*/
private $status;
/**
* @var \DateTime
*
* @ORM\Column(name="create_date", type="datetimetz")
*/
private $create_date;
/**
* @var \DateTime
*
* @ORM\Column(name="update_date", type="datetimetz")
*/
private $update_date;
/**
* Set id.
*
* @param int $id
*
* @return Campaign
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Get Id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set day.
*
* @param string $day
*
* @return Calendar
*/
public function setDay($day)
{
$this->day = $day;
return $this;
}
/**
* Get day.
*
* @return string
*/
public function getDay()
{
return $this->day;
}
/**
* Set status.
*
* @param string $status
*
* @return Calendar
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Get status.
*
* @return string
*/
public function getStatus()
{
return $this->status;
}
/**
* Set createDate.
*
* @param \DateTime $createDate
*
* @return Calendar
*/
public function setCreateDate($createDate)
{
$this->create_date = $createDate;
return $this;
}
/**
* Get createDate.
*
* @return \DateTime
*/
public function getCreateDate()
{
return $this->create_date;
}
/**
* Set updateDate.
*
* @param \DateTime $updateDate
*
* @return Calendar
*/
public function setUpdateDate($updateDate)
{
$this->update_date = $updateDate;
return $this;
}
/**
* Get updateDate.
*
* @return \DateTime
*/
public function getUpdateDate()
{
return $this->update_date;
}
}
}