Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. <?php
  2.  
  3. namespace AppBundle\Entity;
  4.  
  5. use FOS\UserBundle\Model\User;
  6. use Doctrine\ORM\Mapping as ORM;
  7.  
  8. /**
  9. * @ORM\Entity
  10. * @ORM\Table()
  11. */
  12. class Utente extends User
  13. {
  14. /**
  15. * @ORM\Id
  16. * @ORM\Column(type="integer")
  17. * @ORM\GeneratedValue(strategy="AUTO")
  18. */
  19. protected $id;
  20.  
  21.  
  22. /**
  23. *
  24. * @ORM\OneToOne(targetEntity="Fornitore", mappedBy="utente")
  25. *
  26. */
  27. protected $fornitore;
  28.  
  29.  
  30. /**
  31. *
  32. * @ORM\OneToOne(targetEntity="Consulente", mappedBy="utente")
  33. *
  34. */
  35. protected $consulente;
  36.  
  37.  
  38. /**
  39. *
  40. * @ORM\OneToOne(targetEntity="Cliente", mappedBy="utente")
  41. *
  42. */
  43. protected $cliente;
  44.  
  45.  
  46. /**
  47. *
  48. * @ORM\OneToOne(targetEntity="Operaio", mappedBy="utente")
  49. *
  50. */
  51. protected $operaio;
  52.  
  53. /**
  54. * @ORM\Column(type="datetime")
  55. */
  56. protected $dataRegistrazione;
  57.  
  58.  
  59.  
  60. public function __construct(){
  61. parent::__construct();
  62. $this->dataRegistrazione = new \DateTime();
  63. }
  64.  
  65. public function getDataRegistrazione(){
  66. return $this->dataRegistrazione;
  67. }
  68.  
  69.  
  70.  
  71. /**
  72. * Set dataRegistrazione
  73. *
  74. * @param \DateTime $dataRegistrazione
  75. *
  76. * @return Utente
  77. */
  78. public function setDataRegistrazione($dataRegistrazione)
  79. {
  80. $this->dataRegistrazione = $dataRegistrazione;
  81.  
  82. return $this;
  83. }
  84.  
  85. /**
  86. * Set fornitore
  87. *
  88. * @param \AppBundle\Entity\Fornitore $fornitore
  89. *
  90. * @return Utente
  91. */
  92. public function setFornitore(\AppBundle\Entity\Fornitore $fornitore = null)
  93. {
  94. $this->fornitore = $fornitore;
  95.  
  96. return $this;
  97. }
  98.  
  99. /**
  100. * Get fornitore
  101. *
  102. * @return \AppBundle\Entity\Fornitore
  103. */
  104. public function getFornitore()
  105. {
  106. return $this->fornitore;
  107. }
  108.  
  109. /**
  110. * Set consulente
  111. *
  112. * @param \AppBundle\Entity\Consulente $consulente
  113. *
  114. * @return Utente
  115. */
  116. public function setConsulente(\AppBundle\Entity\Consulente $consulente = null)
  117. {
  118. $this->consulente = $consulente;
  119.  
  120. return $this;
  121. }
  122.  
  123. /**
  124. * Get consulente
  125. *
  126. * @return \AppBundle\Entity\Consulente
  127. */
  128. public function getConsulente()
  129. {
  130. return $this->consulente;
  131. }
  132.  
  133. /**
  134. * Set cliente
  135. *
  136. * @param \AppBundle\Entity\Cliente $cliente
  137. *
  138. * @return Utente
  139. */
  140. public function setCliente(\AppBundle\Entity\Cliente $cliente = null)
  141. {
  142. $this->cliente = $cliente;
  143.  
  144. return $this;
  145. }
  146.  
  147. /**
  148. * Get cliente
  149. *
  150. * @return \AppBundle\Entity\Cliente
  151. */
  152. public function getCliente()
  153. {
  154. return $this->cliente;
  155. }
  156.  
  157. /**
  158. * Set operaio
  159. *
  160. * @param \AppBundle\Entity\Operaio $operaio
  161. *
  162. * @return Utente
  163. */
  164. public function setOperaio(\AppBundle\Entity\Operaio $operaio = null)
  165. {
  166. $this->operaio = $operaio;
  167.  
  168. return $this;
  169. }
  170. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement