Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace AppBundle\Entity;
- use FOS\UserBundle\Model\User;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * @ORM\Entity
- * @ORM\Table()
- */
- class Utente extends User
- {
- /**
- * @ORM\Id
- * @ORM\Column(type="integer")
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- protected $id;
- /**
- *
- * @ORM\OneToOne(targetEntity="Fornitore", mappedBy="utente")
- *
- */
- protected $fornitore;
- /**
- *
- * @ORM\OneToOne(targetEntity="Consulente", mappedBy="utente")
- *
- */
- protected $consulente;
- /**
- *
- * @ORM\OneToOne(targetEntity="Cliente", mappedBy="utente")
- *
- */
- protected $cliente;
- /**
- *
- * @ORM\OneToOne(targetEntity="Operaio", mappedBy="utente")
- *
- */
- protected $operaio;
- /**
- * @ORM\Column(type="datetime")
- */
- protected $dataRegistrazione;
- public function __construct(){
- parent::__construct();
- $this->dataRegistrazione = new \DateTime();
- }
- public function getDataRegistrazione(){
- return $this->dataRegistrazione;
- }
- /**
- * Set dataRegistrazione
- *
- * @param \DateTime $dataRegistrazione
- *
- * @return Utente
- */
- public function setDataRegistrazione($dataRegistrazione)
- {
- $this->dataRegistrazione = $dataRegistrazione;
- return $this;
- }
- /**
- * Set fornitore
- *
- * @param \AppBundle\Entity\Fornitore $fornitore
- *
- * @return Utente
- */
- public function setFornitore(\AppBundle\Entity\Fornitore $fornitore = null)
- {
- $this->fornitore = $fornitore;
- return $this;
- }
- /**
- * Get fornitore
- *
- * @return \AppBundle\Entity\Fornitore
- */
- public function getFornitore()
- {
- return $this->fornitore;
- }
- /**
- * Set consulente
- *
- * @param \AppBundle\Entity\Consulente $consulente
- *
- * @return Utente
- */
- public function setConsulente(\AppBundle\Entity\Consulente $consulente = null)
- {
- $this->consulente = $consulente;
- return $this;
- }
- /**
- * Get consulente
- *
- * @return \AppBundle\Entity\Consulente
- */
- public function getConsulente()
- {
- return $this->consulente;
- }
- /**
- * Set cliente
- *
- * @param \AppBundle\Entity\Cliente $cliente
- *
- * @return Utente
- */
- public function setCliente(\AppBundle\Entity\Cliente $cliente = null)
- {
- $this->cliente = $cliente;
- return $this;
- }
- /**
- * Get cliente
- *
- * @return \AppBundle\Entity\Cliente
- */
- public function getCliente()
- {
- return $this->cliente;
- }
- /**
- * Set operaio
- *
- * @param \AppBundle\Entity\Operaio $operaio
- *
- * @return Utente
- */
- public function setOperaio(\AppBundle\Entity\Operaio $operaio = null)
- {
- $this->operaio = $operaio;
- return $this;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement