namespace Ethan\RestBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* EthanRules
*
* @ORM\Table(name="ethan_rules")
* @ORM\Entity
*/
class EthanRules
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="customer_key", type="string", length=45, nullable=false)
*/
private $customerKey;
/**
* @var string
*
* @ORM\Column(name="subscription_key", type="string", length=45, nullable=true)
*/
private $subscriptionKey;
/**
* @var string
*
* @ORM\Column(name="pole", type="string", length=45, nullable=false)
*/
private $pole;
/**
* @var string
*
* @ORM\Column(name="link_number", type="string", length=255, nullable=false)
*/
private $linkNumber;
/**
* @var string
*
* @ORM\Column(name="user", type="string", length=100, nullable=true)
*/
private $user;
/**
* @var \DateTime
*
* @ORM\Column(name="date_rdv", type="datetime", nullable=true)
*/
private $dateRdv;
/**
* @var \DateTime
*
* @ORM\Column(name="created_at", type="datetime", nullable=false)
*/
private $createdAt;
/**
* @var \DateTime
*
* @ORM\Column(name="updated_at", type="datetime", nullable=false)
*/
private $updatedAt;
/**
* @var \Rules
*
* @ORM\ManyToOne(targetEntity="Rules")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="rules_id", referencedColumnName="id")
* })
*/
private $rules;
/**
* @var \Status
*
* @ORM\ManyToOne(targetEntity="Status")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="status_id", referencedColumnName="id")
* })
*/
private $status;
public function _construct()
{
$this->createdAt = new \DateTime();
$this->createdAt->setTimestamp(time());
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set customerKey
*
* @param string $customerKey
* @return EthanRules
*/
public function setCustomerKey($customerKey)
{
$this->customerKey = $customerKey;
return $this;
}
/**
* Get customerKey
*
* @return string
*/
public function getCustomerKey()
{
return $this->customerKey;
}
/**
* Set subscriptionKey
*
* @param string $subscriptionKey
* @return EthanRules
*/
public function setSubscriptionKey($subscriptionKey)
{
$this->subscriptionKey = $subscriptionKey;
return $this;
}
/**
* Get subscriptionKey
*
* @return string
*/
public function getSubscriptionKey()
{
return $this->subscriptionKey;
}
/**
* Set pole
*
* @param string $pole
* @return EthanRules
*/
public function setPole($pole)
{
$this->pole = $pole;
return $this;
}
/**
* Get pole
*
* @return string
*/
public function getPole()
{
return $this->pole;
}
/**
* Set linkNumber
*
* @param string $linkNumber
* @return EthanRules
*/
public function setLinkNumber($linkNumber)
{
$this->linkNumber = $linkNumber;
return $this;
}
/**
* Get linkNumber
*
* @return string
*/
public function getLinkNumber()
{
return $this->linkNumber;
}
/**
* Set user
*
* @param string $user
* @return EthanRules
*/
public function setUser($user)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return string
*/
public function getUser()
{
return $this->user;
}
/**
* Set dateRdv
*
* @param \DateTime $dateRdv
* @return EthanRules
*/
public function setDateRdv($dateRdv)
{
$this->dateRdv = $dateRdv;
return $this;
}
/**
* Get dateRdv
*
* @return \DateTime
*/
public function getDateRdv()
{
return $this->dateRdv;
}
/**
* Set createdAt
*
* @param \DateTime $createdAt
* @return EthanRules
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set updatedAt
*
* @param \DateTime $updatedAt
* @return EthanRules
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set rules
*
* @param \Ethan\RestBundle\Entity\Rules $rules
* @return EthanRules
*/
public function setRules(\Ethan\RestBundle\Entity\Rules $rules = null)
{
$this->rules = $rules;
return $this;
}
/**
* Get rules
*
* @return \Ethan\RestBundle\Entity\Rules
*/
public function getRules()
{
return $this->rules;
}
/**
* Set status
*
* @param \Ethan\RestBundle\Entity\Status $status
* @return EthanRules
*/
public function setStatus(\Ethan\RestBundle\Entity\Status $status = null)
{
$this->status = $status;
return $this;
}
/**
* Get status
*
* @return \Ethan\RestBundle\Entity\Status
*/
public function getStatus()
{
return $this->status;
}
}
顯示EnthanRules實體字段名稱,可能在實體和數據庫中有不同的名稱。例如,如果在實體中您有_public $ rulesId_,那麼您將您的代碼更改爲_e.rulesId_而不是e.rules_id – 2014-10-17 14:34:07
問題不在於計數(*),而是在錯誤中。請更新您的標題 – Aris 2014-10-17 14:58:55