<?php
namespace Customize\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Eccube\Entity\AbstractEntity;
/**
* FavoriteKey
*
* @ORM\Table(name="favorite_key")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Customize\Repository\FavoriteKeyRepository")
*/
class FavoriteKey extends AbstractEntity
{
/**
* @var int
* @ORM\Column(name="id", type="integer", options={"unsigned":true})
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
* @ORM\Column(name="cookie_key", type="string", length=255)
*/
private $cookie_key;
/**
* @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 \Doctrine\Common\Collections\Collection
* @ORM\OneToMany(targetEntity="Customize\Entity\FavoriteProduct", mappedBy="FavoriteKey")
*/
private $FavoriteProducts;
public function __construct()
{
$this->FavoriteProducts = new ArrayCollection();
}
public function getId() { return $this->id; }
public function setCookieKey($cookieKey) { $this->cookie_key = $cookieKey; return $this; }
public function getCookieKey() { return $this->cookie_key; }
public function setCreateDate($createDate) { $this->create_date = $createDate; return $this; }
public function getCreateDate() { return $this->create_date; }
public function setUpdateDate($updateDate) { $this->update_date = $updateDate; return $this; }
public function getUpdateDate() { return $this->update_date; }
public function addFavoriteProduct(FavoriteProduct $favoriteProduct) { $this->FavoriteProducts[] = $favoriteProduct; return $this; }
public function removeFavoriteProduct(FavoriteProduct $favoriteProduct) { return $this->FavoriteProducts->removeElement($favoriteProduct); }
public function getFavoriteProducts() { return $this->FavoriteProducts; }
}