Passed
Push — master ( 3ea9d6...c45a1b )
by Anthony
01:51
created

User::setAdmin()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace Ribs\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({"Ribs\RibsAdminBundle\EventListener\GuidAwareListener"})
14
 */
15
class User
16
{
17
    /**
18
     * @var integer
19
     *
20
     * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true})
21
     * @ORM\Id
22
     * @ORM\GeneratedValue(strategy="IDENTITY")
23
     */
24
    private $id;
25
26
    /**
27
     * @var string
28
     *
29
     * @ORM\Column(name="guid", type="string", length=255, nullable=false)
30
     */
31
    private $guid;
32
	
33
	/**
34
	 * @var AccessRight
35
	 *
36
	 * @ORM\ManyToOne(targetEntity="Ribs\RibsAdminBundle\Entity\AccessRight", inversedBy="users")
37
	 * @ORM\JoinColumn(name="id_access_right", referencedColumnName="id", nullable=true)
38
	 */
39
    private $accessRightList;
40
	
41
	/**
42
	 * @var boolean
43
	 *
44
	 * @ORM\Column(name="admin", type="boolean", nullable=false, options={"default": false})
45
	 */
46
    private $admin;
47
48
    /**
49
     * @var string
50
     *
51
     * @ORM\Column(name="firstname", type="string", length=255, nullable=false)
52
     */
53
    private $firstname;
54
55
    /**
56
     * @var string
57
     *
58
     * @ORM\Column(name="lastname", type="string", length=255, nullable=false)
59
     */
60
    private $lastname;
61
62
    /**
63
     * @var string
64
     *
65
     * @ORM\Column(name="adress", type="string", length=255, nullable=true)
66
     */
67
    private $adress;
68
69
    /**
70
     * @var string
71
     *
72
     * @ORM\Column(name="postal_code", type="string", length=100, nullable=true)
73
     */
74
    private $postalCode;
75
76
    /**
77
     * @var string
78
     *
79
     * @ORM\Column(name="country", type="string", length=100, nullable=true)
80
     */
81
    private $country;
82
83
    /**
84
     * @var string
85
     *
86
     * @ORM\Column(name="state", type="string", length=255, nullable=true)
87
     */
88
    private $state;
89
90
    /**
91
     * @var string
92
     *
93
     * @ORM\Column(name="access_rights", type="text", nullable=true)
94
     */
95
    private $accessRights;
96
	
97
	/**
98
	 * @var boolean
99
	 *
100
	 * @ORM\Column(name="archived", type="boolean", nullable=false, options={"default": false})
101
	 */
102
	private $archived;
103
	
104
	/**
105
	 * @var \DateTime
106
	 *
107
	 * @Gedmo\Timestampable(on="create")
108
	 * @ORM\Column(name="creation_date", type="date", nullable=true)
109
	 */
110
	private $creationDate;
111
	
112
	/**
113
	 * @var \DateTime
114
	 *
115
	 * @Gedmo\Timestampable(on="update")
116
	 * @ORM\Column(name="update_date", type="date", nullable=true)
117
	 */
118
	private $updateDate;
119
120
    /**
121
     * @return int
122
     */
123
    public function getId()
124
    {
125
        return $this->id;
126
    }
127
128
    /**
129
     * @param int $id
130
     */
131
    public function setId($id)
132
    {
133
        $this->id = $id;
134
    }
135
136
    /**
137
     * @return string
138
     */
139
    public function getGuid()
140
    {
141
        return $this->guid;
142
    }
143
144
    /**
145
     * @param string $guid
146
     */
147
    public function setGuid($guid)
148
    {
149
        $this->guid = $guid;
150
    }
151
	
152
	/**
153
	 * @return AccessRight
154
	 */
155
	public function getAccessRightList(): AccessRight
156
	{
157
		return $this->accessRightList;
158
	}
159
	
160
	/**
161
	 * @param AccessRight $accessRightList
162
	 */
163
	public function setAccessRightList(AccessRight $accessRightList)
164
	{
165
		$this->accessRightList = $accessRightList;
166
	}
167
	
168
	/**
169
	 * @return bool
170
	 */
171
	public function getAdmin(): bool
172
	{
173
		return $this->admin;
174
	}
175
	
176
	/**
177
	 * @param bool $admin
178
	 */
179
	public function setAdmin(bool $admin)
180
	{
181
		$this->admin = $admin;
182
	}
183
184
    /**
185
     * @return string
186
     */
187
    public function getFirstname()
188
    {
189
        return $this->firstname;
190
    }
191
192
    /**
193
     * @param string $firstname
194
     */
195
    public function setFirstname($firstname)
196
    {
197
        $this->firstname = $firstname;
198
    }
199
200
    /**
201
     * @return string
202
     */
203
    public function getLastname()
204
    {
205
        return $this->lastname;
206
    }
207
208
    /**
209
     * @param string $lastname
210
     */
211
    public function setLastname($lastname)
212
    {
213
        $this->lastname = $lastname;
214
    }
215
216
    /**
217
     * @return string
218
     */
219
    public function getAdress()
220
    {
221
        return $this->adress;
222
    }
223
224
    /**
225
     * @param string $adress
226
     */
227
    public function setAdress($adress)
228
    {
229
        $this->adress = $adress;
230
    }
231
232
    /**
233
     * @return string
234
     */
235
    public function getPostalCode()
236
    {
237
        return $this->postalCode;
238
    }
239
240
    /**
241
     * @param string $postalCode
242
     */
243
    public function setPostalCode($postalCode)
244
    {
245
        $this->postalCode = $postalCode;
246
    }
247
248
    /**
249
     * @return string
250
     */
251
    public function getCountry()
252
    {
253
        return $this->country;
254
    }
255
256
    /**
257
     * @param string $country
258
     */
259
    public function setCountry($country)
260
    {
261
        $this->country = $country;
262
    }
263
264
    /**
265
     * @return string
266
     */
267
    public function getState()
268
    {
269
        return $this->state;
270
    }
271
272
    /**
273
     * @param string $state
274
     */
275
    public function setState($state)
276
    {
277
        $this->state = $state;
278
    }
279
280
    /**
281
     * @return string
282
     */
283
    public function getAccessRights()
284
    {
285
        return $this->accessRights;
286
    }
287
288
    /**
289
     * @param string $accessRights
290
     */
291
    public function setAccessRights($accessRights)
292
    {
293
        $this->accessRights = $accessRights;
294
    }
295
296
    /**
297
     * @return \DateTime
298
     */
299
    public function getCreationDate()
300
    {
301
        return $this->creationDate;
302
    }
303
304
    /**
305
     * @param \DateTime $creationDate
306
     */
307
    public function setCreationDate($creationDate)
308
    {
309
        $this->creationDate = $creationDate;
310
    }
311
	
312
	/**
313
	 * @return boolean
314
	 */
315
	public function getArchived(): bool
316
	{
317
		return $this->archived;
318
	}
319
	
320
	/**
321
	 * @param boolean $archived
322
	 */
323
	public function setArchived(bool $archived)
324
	{
325
		$this->archived = $archived;
326
	}
327
328
    /**
329
     * @return \DateTime
330
     */
331
    public function getUpdateDate()
332
    {
333
        return $this->updateDate;
334
    }
335
336
    /**
337
     * @param \DateTime $updateDate
338
     */
339
    public function setUpdateDate($updateDate)
340
    {
341
        $this->updateDate = $updateDate;
342
    }
343
344
345
}
346
347