src/JuridicusBundle/Entity/Partner.php line 12

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. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. /**
  7. * Partner
  8. */
  9. class Partner
  10. {
  11. const CLASSNAME = __CLASS__;
  12. /**
  13. * @var integer
  14. */
  15. private $id;
  16. /**
  17. * @var string
  18. * @Assert\NotBlank
  19. * @Assert\Length(max="32")
  20. */
  21. private $name;
  22. /**
  23. * @var string
  24. * @Assert\NotBlank
  25. * @Assert\Length(max="64")
  26. */
  27. private $anrede_rechnung;
  28. /**
  29. * @var \JF\JuridicusBundle\Entity\User
  30. * @Assert\Valid
  31. */
  32. private $user;
  33. /**
  34. * @var \Doctrine\Common\Collections\Collection
  35. */
  36. private $exporte;
  37. /**
  38. * Get id
  39. *
  40. * @return integer
  41. */
  42. public function getId()
  43. {
  44. return $this->id;
  45. }
  46. /**
  47. * Set name
  48. *
  49. * @param string $name
  50. * @return Partner
  51. */
  52. public function setName($name)
  53. {
  54. $this->name = $name;
  55. return $this;
  56. }
  57. /**
  58. * Get name
  59. *
  60. * @return string
  61. */
  62. public function getName()
  63. {
  64. return $this->name;
  65. }
  66. /**
  67. * Set user [OWNING SIDE]
  68. *
  69. * @param \JF\JuridicusBundle\Entity\User $user
  70. * @return Partner
  71. */
  72. public function setUser(\JF\JuridicusBundle\Entity\User $user = null)
  73. {
  74. $this->user = $user;
  75. return $this;
  76. }
  77. /**
  78. * Get user [OWNING SIDE]
  79. *
  80. * @return \JF\JuridicusBundle\Entity\User
  81. */
  82. public function getUser()
  83. {
  84. return $this->user;
  85. }
  86. public function __toString()
  87. {
  88. if ($this->id)
  89. {
  90. return $this->name;
  91. }
  92. return 'Neuer Partner';
  93. }
  94. /**
  95. * Set anrede_rechnung
  96. *
  97. * @param string $anredeRechnung
  98. * @return Partner
  99. */
  100. public function setAnredeRechnung($anredeRechnung)
  101. {
  102. $this->anrede_rechnung = $anredeRechnung;
  103. return $this;
  104. }
  105. /**
  106. * Get anrede_rechnung
  107. *
  108. * @return string
  109. */
  110. public function getAnredeRechnung()
  111. {
  112. return $this->anrede_rechnung;
  113. }
  114. /**
  115. * Constructor
  116. */
  117. public function __construct()
  118. {
  119. $this->exporte = new \Doctrine\Common\Collections\ArrayCollection();
  120. }
  121. /**
  122. * Add exporte [INVERSE SIDE]
  123. *
  124. * @param \JF\JuridicusBundle\Entity\Export $exporte
  125. * @return Partner
  126. */
  127. public function addExporte(\JF\JuridicusBundle\Entity\Export $exporte)
  128. {
  129. $this->exporte[] = $exporte;
  130. return $this;
  131. }
  132. /**
  133. * Remove exporte [INVERSE SIDE]
  134. *
  135. * @param \JF\JuridicusBundle\Entity\Export $exporte
  136. */
  137. public function removeExporte(\JF\JuridicusBundle\Entity\Export $exporte)
  138. {
  139. $this->exporte->removeElement($exporte);
  140. }
  141. /**
  142. * Get exporte
  143. *
  144. * @return \Doctrine\Common\Collections\Collection
  145. */
  146. public function getExporte()
  147. {
  148. return $this->exporte;
  149. }
  150. }