1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace PiouPiou\RibsAdminBundle\Entity; |
4
|
|
|
|
5
|
|
|
use Doctrine\ORM\Mapping as ORM; |
6
|
|
|
use Gedmo\Mapping\Annotation as Gedmo; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* User |
10
|
|
|
* |
11
|
|
|
* @ORM\Table(name="user", uniqueConstraints={@ORM\UniqueConstraint(name="guid_UNIQUE", columns={"guid"})}) |
12
|
|
|
* @ORM\Entity |
13
|
|
|
* @ORM\EntityListeners({"PiouPiou\RibsAdminBundle\EventListener\GuidAwareListener", "PiouPiou\RibsAdminBundle\EventListener\CreateUpdateAwareListener"}) |
14
|
|
|
*/ |
15
|
|
|
class User |
16
|
|
|
{ |
17
|
|
|
use CreatedUpdatedTrait; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @var integer |
21
|
|
|
* |
22
|
|
|
* @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
23
|
|
|
* @ORM\Id |
24
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
25
|
|
|
*/ |
26
|
|
|
private $id; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var string |
30
|
|
|
* |
31
|
|
|
* @ORM\Column(name="guid", type="string", length=255, nullable=false) |
32
|
|
|
*/ |
33
|
|
|
private $guid; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @var AccessRight |
37
|
|
|
* |
38
|
|
|
* @ORM\ManyToOne(targetEntity="PiouPiou\RibsAdminBundle\Entity\AccessRight", inversedBy="users") |
39
|
|
|
* @ORM\JoinColumn(name="id_access_right", referencedColumnName="id", nullable=true) |
40
|
|
|
*/ |
41
|
|
|
private $accessRightList; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var boolean |
45
|
|
|
* |
46
|
|
|
* @ORM\Column(name="admin", type="boolean", nullable=true, options={"default": false}) |
47
|
|
|
*/ |
48
|
|
|
private $admin; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @var string |
52
|
|
|
* |
53
|
|
|
* @ORM\Column(name="firstname", type="string", length=255, nullable=false) |
54
|
|
|
*/ |
55
|
|
|
private $firstname; |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @var string |
59
|
|
|
* |
60
|
|
|
* @ORM\Column(name="lastname", type="string", length=255, nullable=false) |
61
|
|
|
*/ |
62
|
|
|
private $lastname; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @var string |
66
|
|
|
* |
67
|
|
|
* @ORM\Column(name="adress", type="string", length=255, nullable=true) |
68
|
|
|
*/ |
69
|
|
|
private $adress; |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @var string |
73
|
|
|
* |
74
|
|
|
* @ORM\Column(name="postal_code", type="string", length=100, nullable=true) |
75
|
|
|
*/ |
76
|
|
|
private $postalCode; |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @var string |
80
|
|
|
* |
81
|
|
|
* @ORM\Column(name="country", type="string", length=100, nullable=true) |
82
|
|
|
*/ |
83
|
|
|
private $country; |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* @var string |
87
|
|
|
* |
88
|
|
|
* @ORM\Column(name="state", type="string", length=255, nullable=true) |
89
|
|
|
*/ |
90
|
|
|
private $state; |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @var string |
94
|
|
|
* |
95
|
|
|
* @ORM\Column(name="access_rights", type="text", nullable=true) |
96
|
|
|
*/ |
97
|
|
|
private $accessRights; |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* @var boolean |
101
|
|
|
* |
102
|
|
|
* @ORM\Column(name="archived", type="boolean", nullable=true, options={"default": false}) |
103
|
|
|
*/ |
104
|
|
|
private $archived = false; |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @return int |
108
|
|
|
*/ |
109
|
|
|
public function getId() |
110
|
|
|
{ |
111
|
|
|
return $this->id; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @param int $id |
116
|
|
|
*/ |
117
|
|
|
public function setId($id) |
118
|
|
|
{ |
119
|
|
|
$this->id = $id; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* @return string |
124
|
|
|
*/ |
125
|
|
|
public function getGuid() |
126
|
|
|
{ |
127
|
|
|
return $this->guid; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* @param string $guid |
132
|
|
|
*/ |
133
|
|
|
public function setGuid($guid) |
134
|
|
|
{ |
135
|
|
|
$this->guid = $guid; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @return AccessRight |
140
|
|
|
*/ |
141
|
|
|
public function getAccessRightList() |
142
|
|
|
{ |
143
|
|
|
return $this->accessRightList; |
144
|
|
|
} |
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* @param AccessRight $accessRightList |
148
|
|
|
*/ |
149
|
|
|
public function setAccessRightList($accessRightList) |
150
|
|
|
{ |
151
|
|
|
$this->accessRightList = $accessRightList; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* @return bool |
156
|
|
|
*/ |
157
|
|
|
public function getAdmin(): ?bool |
158
|
|
|
{ |
159
|
|
|
return $this->admin; |
160
|
|
|
} |
161
|
|
|
|
162
|
|
|
/** |
163
|
|
|
* @param bool $admin |
164
|
|
|
*/ |
165
|
|
|
public function setAdmin(bool $admin) |
166
|
|
|
{ |
167
|
|
|
$this->admin = $admin; |
168
|
|
|
} |
169
|
|
|
|
170
|
|
|
/** |
171
|
|
|
* @return string |
172
|
|
|
*/ |
173
|
|
|
public function getFirstname() |
174
|
|
|
{ |
175
|
|
|
return $this->firstname; |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
/** |
179
|
|
|
* @param string $firstname |
180
|
|
|
*/ |
181
|
|
|
public function setFirstname($firstname) |
182
|
|
|
{ |
183
|
|
|
$this->firstname = $firstname; |
184
|
|
|
} |
185
|
|
|
|
186
|
|
|
/** |
187
|
|
|
* @return string |
188
|
|
|
*/ |
189
|
|
|
public function getLastname() |
190
|
|
|
{ |
191
|
|
|
return $this->lastname; |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
/** |
195
|
|
|
* @param string $lastname |
196
|
|
|
*/ |
197
|
|
|
public function setLastname($lastname) |
198
|
|
|
{ |
199
|
|
|
$this->lastname = $lastname; |
200
|
|
|
} |
201
|
|
|
|
202
|
|
|
/** |
203
|
|
|
* @return string |
204
|
|
|
*/ |
205
|
|
|
public function getAdress() |
206
|
|
|
{ |
207
|
|
|
return $this->adress; |
208
|
|
|
} |
209
|
|
|
|
210
|
|
|
/** |
211
|
|
|
* @param string $adress |
212
|
|
|
*/ |
213
|
|
|
public function setAdress($adress) |
214
|
|
|
{ |
215
|
|
|
$this->adress = $adress; |
216
|
|
|
} |
217
|
|
|
|
218
|
|
|
/** |
219
|
|
|
* @return string |
220
|
|
|
*/ |
221
|
|
|
public function getPostalCode() |
222
|
|
|
{ |
223
|
|
|
return $this->postalCode; |
224
|
|
|
} |
225
|
|
|
|
226
|
|
|
/** |
227
|
|
|
* @param string $postalCode |
228
|
|
|
*/ |
229
|
|
|
public function setPostalCode($postalCode) |
230
|
|
|
{ |
231
|
|
|
$this->postalCode = $postalCode; |
232
|
|
|
} |
233
|
|
|
|
234
|
|
|
/** |
235
|
|
|
* @return string |
236
|
|
|
*/ |
237
|
|
|
public function getCountry() |
238
|
|
|
{ |
239
|
|
|
return $this->country; |
240
|
|
|
} |
241
|
|
|
|
242
|
|
|
/** |
243
|
|
|
* @param string $country |
244
|
|
|
*/ |
245
|
|
|
public function setCountry($country) |
246
|
|
|
{ |
247
|
|
|
$this->country = $country; |
248
|
|
|
} |
249
|
|
|
|
250
|
|
|
/** |
251
|
|
|
* @return string |
252
|
|
|
*/ |
253
|
|
|
public function getState() |
254
|
|
|
{ |
255
|
|
|
return $this->state; |
256
|
|
|
} |
257
|
|
|
|
258
|
|
|
/** |
259
|
|
|
* @param string $state |
260
|
|
|
*/ |
261
|
|
|
public function setState($state) |
262
|
|
|
{ |
263
|
|
|
$this->state = $state; |
264
|
|
|
} |
265
|
|
|
|
266
|
|
|
/** |
267
|
|
|
* @return string |
268
|
|
|
*/ |
269
|
|
|
public function getAccessRights() |
270
|
|
|
{ |
271
|
|
|
return $this->accessRights; |
272
|
|
|
} |
273
|
|
|
|
274
|
|
|
/** |
275
|
|
|
* @param string $accessRights |
276
|
|
|
*/ |
277
|
|
|
public function setAccessRights($accessRights) |
278
|
|
|
{ |
279
|
|
|
$this->accessRights = $accessRights; |
280
|
|
|
} |
281
|
|
|
|
282
|
|
|
/** |
283
|
|
|
* @return boolean |
284
|
|
|
*/ |
285
|
|
|
public function getArchived(): ?bool |
286
|
|
|
{ |
287
|
|
|
return $this->archived; |
288
|
|
|
} |
289
|
|
|
|
290
|
|
|
/** |
291
|
|
|
* @param boolean $archived |
292
|
|
|
*/ |
293
|
|
|
public function setArchived(bool $archived) |
294
|
|
|
{ |
295
|
|
|
$this->archived = $archived; |
296
|
|
|
} |
297
|
|
|
} |
298
|
|
|
|
299
|
|
|
|