src/JuridicusBundle/Entity/Empfehlung.php line 13

Open in your IDE?
  1. <?php
  2. namespace JF\JuridicusBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6. * Empfehlung
  7. *
  8. * @ORM\Entity
  9. */
  10. class Empfehlung
  11. {
  12. const CLASSNAME = __CLASS__;
  13. /**
  14. * @var integer
  15. */
  16. private $id;
  17. /**
  18. * @var string
  19. * @Assert\NotBlank
  20. * @Assert\Email
  21. * @Assert\Length(max="255")
  22. */
  23. private $email;
  24. /**
  25. *
  26. * @var boolean
  27. */
  28. private $registriert;
  29. /**
  30. * @var \DateTime
  31. * @Assert\Type(\DateTimeInterface::class)
  32. */
  33. private $created_at;
  34. /**
  35. * @var \JF\JuridicusBundle\Entity\Kunde
  36. * @Assert\Valid
  37. */
  38. private $kunde;
  39. /**
  40. * Get id
  41. *
  42. * @return integer
  43. */
  44. public function getId()
  45. {
  46. return $this->id;
  47. }
  48. /**
  49. * Set email
  50. *
  51. * @param string $email
  52. * @return Empfehlung
  53. */
  54. public function setEmail($email)
  55. {
  56. $this->email = $email;
  57. return $this;
  58. }
  59. /**
  60. * Get email
  61. *
  62. * @return string
  63. */
  64. public function getEmail()
  65. {
  66. return $this->email;
  67. }
  68. /**
  69. * Set registriert
  70. *
  71. * @param string $registriert
  72. * @return Empfehlung
  73. */
  74. public function setRegistriert($registriert)
  75. {
  76. $this->registriert = $registriert;
  77. return $this;
  78. }
  79. /**
  80. * Get registriert
  81. *
  82. * @return boolean
  83. */
  84. public function getRegistriert()
  85. {
  86. return $this->registriert;
  87. }
  88. /**
  89. * Set created_at
  90. *
  91. * @param \DateTime $createdAt
  92. * @return Empfehlung
  93. */
  94. public function setCreatedAt($createdAt)
  95. {
  96. $this->created_at = $createdAt;
  97. return $this;
  98. }
  99. /**
  100. * Get created_at
  101. *
  102. * @return \DateTime
  103. */
  104. public function getCreatedAt()
  105. {
  106. return $this->created_at;
  107. }
  108. /**
  109. * Set kunde [OWNING SIDE]
  110. *
  111. * @param \JF\JuridicusBundle\Entity\Kunde $kunde
  112. * @return Empfehlung
  113. */
  114. public function setKunde(\JF\JuridicusBundle\Entity\Kunde $kunde = null)
  115. {
  116. $this->kunde = $kunde;
  117. return $this;
  118. }
  119. /**
  120. * Get kunde
  121. *
  122. * @return \JF\JuridicusBundle\Entity\Kunde
  123. */
  124. public function getKunde()
  125. {
  126. return $this->kunde;
  127. }
  128. /**
  129. * __toString
  130. *
  131. * @return string
  132. */
  133. public function __toString()
  134. {
  135. return sprintf( '%s (%s)' ,$this->email, $this->created_at->format('d.m.Y H:i:s') );
  136. }
  137. }