1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Alpixel\Bundle\UserBundle\Entity; |
4
|
|
|
|
5
|
|
|
use Doctrine\ORM\Mapping as ORM; |
6
|
|
|
use FOS\UserBundle\Model\User as BaseUser; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Page. |
10
|
|
|
* |
11
|
|
|
* @ORM\Table(name="account_admin") |
12
|
|
|
* @ORM\Entity |
13
|
|
|
*/ |
14
|
|
|
class Admin extends BaseUser |
15
|
|
|
{ |
16
|
|
|
/** |
17
|
|
|
* @var int |
18
|
|
|
* |
19
|
|
|
* @ORM\Id |
20
|
|
|
* @ORM\Column(name="admin_id", type="integer", nullable=false) |
21
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
22
|
|
|
*/ |
23
|
|
|
protected $id; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @var string |
27
|
|
|
* |
28
|
|
|
* @ORM\Column(name="firstname", type="string", length=150, nullable=false) |
29
|
|
|
*/ |
30
|
|
|
protected $firstname; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var string |
34
|
|
|
* |
35
|
|
|
* @ORM\Column(name="lastname", type="string", length=150, nullable=false) |
36
|
|
|
*/ |
37
|
|
|
protected $lastname; |
38
|
|
|
|
39
|
|
|
public function __construct() |
40
|
|
|
{ |
41
|
|
|
parent::__construct(); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
public function __toString() |
45
|
|
|
{ |
46
|
|
|
return $this->firstname.' '.strtoupper($this->lastname); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
public function getParent() |
50
|
|
|
{ |
51
|
|
|
return 'FOSUserBundle'; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Gets the value of id. |
56
|
|
|
* |
57
|
|
|
* @return int |
58
|
|
|
*/ |
59
|
|
|
public function getID() |
60
|
|
|
{ |
61
|
|
|
return $this->id; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* Sets the value of id. |
66
|
|
|
* |
67
|
|
|
* @param int $id the id |
68
|
|
|
* |
69
|
|
|
* @return self |
70
|
|
|
*/ |
71
|
|
|
public function setID($id) |
72
|
|
|
{ |
73
|
|
|
$this->id = $id; |
74
|
|
|
|
75
|
|
|
return $this; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* Gets the value of firstname. |
80
|
|
|
* |
81
|
|
|
* @return string |
82
|
|
|
*/ |
83
|
|
|
public function getFirstname() |
84
|
|
|
{ |
85
|
|
|
return $this->firstname; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* Sets the value of firstname. |
90
|
|
|
* |
91
|
|
|
* @param string $firstname the firstname |
92
|
|
|
* |
93
|
|
|
* @return self |
94
|
|
|
*/ |
95
|
|
|
public function setFirstname($firstname) |
96
|
|
|
{ |
97
|
|
|
$this->firstname = $firstname; |
98
|
|
|
|
99
|
|
|
return $this; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* Gets the value of lastname. |
104
|
|
|
* |
105
|
|
|
* @return string |
106
|
|
|
*/ |
107
|
|
|
public function getLastname() |
108
|
|
|
{ |
109
|
|
|
return $this->lastname; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* Sets the value of lastname. |
114
|
|
|
* |
115
|
|
|
* @param string $lastname the lastname |
116
|
|
|
* |
117
|
|
|
* @return self |
118
|
|
|
*/ |
119
|
|
|
public function setLastname($lastname) |
120
|
|
|
{ |
121
|
|
|
$this->lastname = $lastname; |
122
|
|
|
|
123
|
|
|
return $this; |
124
|
|
|
} |
125
|
|
|
} |
126
|
|
|
|