<?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 Eccube\Entity\Product;
if (!class_exists('\Customize\Entity\TextWarning')) {
/**
* Season
*
* @ORM\Table(name="dtb_text_warning")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Customize\Repository\TextWarningRepository")
*/
class TextWarning extends \Eccube\Entity\AbstractEntity
{
public const TYPE_ORDER = 'order';
public const TYPE_DELIVERY = 'delivery';
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", options={"unsigned":true})
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var integer
*
* @ORM\Column(name="send_data_method_id", type="integer")
*/
private $send_data_method_id;
/**
* @var string
*
* @ORM\Column(name="warning", type="text", nullable=true)
*/
private $warning;
/**
* @var string
*
* @ORM\Column(name="type", type="string", options={"default": "order"})
*/
private $type;
/**
* @var \DateTime
*
* @ORM\Column(name="create_date", type="datetimetz")
*/
private $create_date;
/**
* @var \DateTime
*
* @ORM\Column(name="update_date", type="datetimetz")
*/
private $update_date;
/**
* @var \Eccube\Entity\Product
*
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Product", inversedBy="ProductTextWarnings")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="product_id", referencedColumnName="id")
* })
*/
private $Product;
/**
* Set id.
*
* @param int $id
*
* @return TextWarning
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Get Id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set type.
*
* @param int $type
*
* @return TextWarning
*/
public function setType($type)
{
$this->type = $type;
return $this;
}
/**
* Get Id.
*
* @return string
*/
public function getType()
{
return $this->type;
}
/**
* Set send_data_method_id.
*
* @param string $send_data_method_id
*
* @return TextWarning
*/
public function setSendDataMethodId($send_data_method_id)
{
$this->send_data_method_id = $send_data_method_id;
return $this;
}
/**
* Get send_data_method_id.
*
* @return string
*/
public function getSendDataMethodId()
{
return $this->send_data_method_id;
}
/**
* Set warning.
*
* @param string $warning
*
* @return TextWarning
*/
public function setWarning($warning)
{
$this->warning = $warning;
return $this;
}
/**
* Get warning.
*
* @return string
*/
public function getWarning()
{
return $this->warning;
}
/**
* Get product.
*
* @return \Eccube\Entity\Product|null
*/
public function getProduct()
{
return $this->Product;
}
/**
* Set product.
*
* @param \Eccube\Entity\Product|null $product
*
* @return TextWarning
*/
public function setProduct(Product $product = null)
{
$this->Product = $product;
return $this;
}
/**
* Set createDate.
*
* @param \DateTime $createDate
*
* @return TextWarning
*/
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 TextWarning
*/
public function setUpdateDate($updateDate)
{
$this->update_date = $updateDate;
return $this;
}
/**
* Get updateDate.
*
* @return \DateTime
*/
public function getUpdateDate()
{
return $this->update_date;
}
}
}