Advertisement
Guest User

Untitled

a guest
Aug 15th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.61 KB | None | 0 0
  1. <?php
  2.  
  3. namespace SeguridadBundle\Entity;
  4.  
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use FOS\UserBundle\Model\User as BaseUser;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. /**
  10.  * User
  11.  *
  12.  * @ORM\Entity
  13.  * @ORM\Table(name="usuario_grupo")
  14.  */
  15. class UserGroup
  16. {
  17. //
  18. //    public function __toString()
  19. //    {
  20. //        return $this->getEmail();
  21. //    }
  22.  
  23.     /**
  24.      * @ORM\Id
  25.      * @ORM\Column(type="integer")
  26.      * @ORM\GeneratedValue(strategy="AUTO")
  27.      */
  28.     protected $id;
  29.  
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity="PrestamoBundle\Entity\Persona", inversedBy="grupos")
  32.      * @ORM\JoinColumn(name="persona_id", referencedColumnName="id")
  33.      */
  34.     private $persona;
  35.  
  36.  
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="SeguridadBundle\Entity\User", inversedBy="grupos")
  39.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  40.      */
  41.     private $cuenta;
  42.  
  43.     /**
  44.      * @ORM\ManyToOne(targetEntity="SeguridadBundle\Entity\Group", inversedBy="grupos")
  45.      * @ORM\JoinColumn(name="group_id", referencedColumnName="id")
  46.      */
  47.     private $grupo;
  48.    
  49.  
  50.  
  51.     /**
  52.      * Get id
  53.      *
  54.      * @return integer
  55.      */
  56.     public function getId()
  57.     {
  58.         return $this->id;
  59.     }
  60.  
  61.     /**
  62.      * Set persona
  63.      *
  64.      * @param \PrestamoBundle\Entity\Persona $persona
  65.      *
  66.      * @return UserGroup
  67.      */
  68.     public function setPersona(\PrestamoBundle\Entity\Persona $persona = null)
  69.     {
  70.         $this->persona = $persona;
  71.  
  72.         return $this;
  73.     }
  74.  
  75.     /**
  76.      * Get persona
  77.      *
  78.      * @return \PrestamoBundle\Entity\Persona
  79.      */
  80.     public function getPersona()
  81.     {
  82.         return $this->persona;
  83.     }
  84.  
  85.     /**
  86.      * Set cuenta
  87.      *
  88.      * @param \SeguridadBundle\Entity\User $cuenta
  89.      *
  90.      * @return UserGroup
  91.      */
  92.     public function setCuenta(\SeguridadBundle\Entity\User $cuenta = null)
  93.     {
  94.         $this->cuenta = $cuenta;
  95.  
  96.         return $this;
  97.     }
  98.  
  99.     /**
  100.      * Get cuenta
  101.      *
  102.      * @return \SeguridadBundle\Entity\User
  103.      */
  104.     public function getCuenta()
  105.     {
  106.         return $this->cuenta;
  107.     }
  108.  
  109.     /**
  110.      * Set grupo
  111.      *
  112.      * @param \SeguridadBundle\Entity\Group $grupo
  113.      *
  114.      * @return UserGroup
  115.      */
  116.     public function setGrupo(\SeguridadBundle\Entity\Group $grupo = null)
  117.     {
  118.         $this->grupo = $grupo;
  119.  
  120.         return $this;
  121.     }
  122.  
  123.     /**
  124.      * Get grupo
  125.      *
  126.      * @return \SeguridadBundle\Entity\Group
  127.      */
  128.     public function getGrupo()
  129.     {
  130.         return $this->grupo;
  131.     }
  132. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement