Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace SeguridadBundle\Entity;
- use Doctrine\Common\Collections\ArrayCollection;
- use FOS\UserBundle\Model\User as BaseUser;
- use Doctrine\ORM\Mapping as ORM;
- use Symfony\Component\Validator\Constraints as Assert;
- /**
- * User
- *
- * @ORM\Entity
- * @ORM\Table(name="usuario_grupo")
- */
- class UserGroup
- {
- //
- // public function __toString()
- // {
- // return $this->getEmail();
- // }
- /**
- * @ORM\Id
- * @ORM\Column(type="integer")
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- protected $id;
- /**
- * @ORM\ManyToOne(targetEntity="PrestamoBundle\Entity\Persona", inversedBy="grupos")
- * @ORM\JoinColumn(name="persona_id", referencedColumnName="id")
- */
- private $persona;
- /**
- * @ORM\ManyToOne(targetEntity="SeguridadBundle\Entity\User", inversedBy="grupos")
- * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
- */
- private $cuenta;
- /**
- * @ORM\ManyToOne(targetEntity="SeguridadBundle\Entity\Group", inversedBy="grupos")
- * @ORM\JoinColumn(name="group_id", referencedColumnName="id")
- */
- private $grupo;
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set persona
- *
- * @param \PrestamoBundle\Entity\Persona $persona
- *
- * @return UserGroup
- */
- public function setPersona(\PrestamoBundle\Entity\Persona $persona = null)
- {
- $this->persona = $persona;
- return $this;
- }
- /**
- * Get persona
- *
- * @return \PrestamoBundle\Entity\Persona
- */
- public function getPersona()
- {
- return $this->persona;
- }
- /**
- * Set cuenta
- *
- * @param \SeguridadBundle\Entity\User $cuenta
- *
- * @return UserGroup
- */
- public function setCuenta(\SeguridadBundle\Entity\User $cuenta = null)
- {
- $this->cuenta = $cuenta;
- return $this;
- }
- /**
- * Get cuenta
- *
- * @return \SeguridadBundle\Entity\User
- */
- public function getCuenta()
- {
- return $this->cuenta;
- }
- /**
- * Set grupo
- *
- * @param \SeguridadBundle\Entity\Group $grupo
- *
- * @return UserGroup
- */
- public function setGrupo(\SeguridadBundle\Entity\Group $grupo = null)
- {
- $this->grupo = $grupo;
- return $this;
- }
- /**
- * Get grupo
- *
- * @return \SeguridadBundle\Entity\Group
- */
- public function getGrupo()
- {
- return $this->grupo;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement