<?phpnamespace JF\JuridicusBundle\Entity;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;/** * Empfehlung * * @ORM\Entity */class Empfehlung{ const CLASSNAME = __CLASS__; /** * @var integer */ private $id; /** * @var string * @Assert\NotBlank * @Assert\Email * @Assert\Length(max="255") */ private $email; /** * * @var boolean */ private $registriert; /** * @var \DateTime * @Assert\Type(\DateTimeInterface::class) */ private $created_at; /** * @var \JF\JuridicusBundle\Entity\Kunde * @Assert\Valid */ private $kunde; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set email * * @param string $email * @return Empfehlung */ public function setEmail($email) { $this->email = $email; return $this; } /** * Get email * * @return string */ public function getEmail() { return $this->email; } /** * Set registriert * * @param string $registriert * @return Empfehlung */ public function setRegistriert($registriert) { $this->registriert = $registriert; return $this; } /** * Get registriert * * @return boolean */ public function getRegistriert() { return $this->registriert; } /** * Set created_at * * @param \DateTime $createdAt * @return Empfehlung */ public function setCreatedAt($createdAt) { $this->created_at = $createdAt; return $this; } /** * Get created_at * * @return \DateTime */ public function getCreatedAt() { return $this->created_at; } /** * Set kunde [OWNING SIDE] * * @param \JF\JuridicusBundle\Entity\Kunde $kunde * @return Empfehlung */ public function setKunde(\JF\JuridicusBundle\Entity\Kunde $kunde = null) { $this->kunde = $kunde; return $this; } /** * Get kunde * * @return \JF\JuridicusBundle\Entity\Kunde */ public function getKunde() { return $this->kunde; } /** * __toString * * @return string */ public function __toString() { return sprintf( '%s (%s)' ,$this->email, $this->created_at->format('d.m.Y H:i:s') ); }}