| 1 | <?php |
||
| 14 | class User extends BaseUser |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @ORM\Id |
||
| 18 | * @ORM\Column(type="integer") |
||
| 19 | * @ORM\GeneratedValue(strategy="AUTO") |
||
| 20 | */ |
||
| 21 | protected $id; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Group") |
||
| 25 | * @ORM\JoinTable(name="fos_user_user_group", |
||
| 26 | * joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")}, |
||
| 27 | * inverseJoinColumns={@ORM\JoinColumn(name="group_id", referencedColumnName="id")} |
||
| 28 | * ) |
||
| 29 | */ |
||
| 30 | protected $groups; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @ORM\OneToOne(targetEntity="Invitation") |
||
| 34 | * @ORM\JoinColumn(referencedColumnName="code") |
||
| 35 | * @Assert\NotNull(message="Your invitation is wrong", groups={"Registration"}) |
||
| 36 | */ |
||
| 37 | protected $invitation; |
||
| 38 | |||
| 39 | public function __construct() |
||
| 43 | |||
| 44 | public function setInvitation(Invitation $invitation) |
||
| 48 | |||
| 49 | public function getInvitation() |
||
| 53 | } |
||
| 54 |