1 | <?php |
||
17 | */ |
||
18 | class User |
||
19 | { |
||
20 | /** |
||
21 | * @ORM\Id() |
||
22 | * @ORM\GeneratedValue(strategy="AUTO") |
||
23 | * @ORM\Column(type="integer") |
||
24 | */ |
||
25 | protected int $id; |
||
|
|||
26 | |||
27 | /** |
||
28 | * @ORM\ManyToMany(targetEntity="UserGroup", mappedBy="users") |
||
29 | * |
||
30 | * @var Collection|UserGroup[] |
||
31 | */ |
||
32 | protected Collection $groups; |
||
33 | |||
34 | /** |
||
35 | * @ORM\OneToMany(targetEntity="Session", mappedBy="user") |
||
36 | * |
||
37 | * @var Collection|Session[] |
||
38 | */ |
||
39 | protected Collection $sessions; |
||
40 | |||
41 | /** @ORM\OneToOne(targetEntity="Address") */ |
||
42 | protected Address $address; |
||
43 | |||
44 | public function __construct() |
||
45 | { |
||
46 | $this->groups = new ArrayCollection(); |
||
47 | $this->sessions = new ArrayCollection(); |
||
48 | } |
||
49 | } |
||
50 |