1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Pnz\MattermostClient\Model\User; |
6
|
|
|
|
7
|
|
|
use Pnz\MattermostClient\Model\Model; |
8
|
|
|
|
9
|
|
|
final class User extends Model |
10
|
|
|
{ |
11
|
|
|
/** |
12
|
|
|
* @return string |
13
|
|
|
*/ |
14
|
3 |
|
public function getId() |
15
|
|
|
{ |
16
|
3 |
|
return $this->data['id']; |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @return string |
21
|
|
|
*/ |
22
|
3 |
|
public function getCreateAt() |
23
|
|
|
{ |
24
|
3 |
|
return $this->data['create_at']; |
25
|
|
|
} |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @return string |
29
|
|
|
*/ |
30
|
3 |
|
public function getDeleteAt() |
31
|
|
|
{ |
32
|
3 |
|
return $this->data['delete_at']; |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @return string |
37
|
|
|
*/ |
38
|
3 |
|
public function getUpdateAt() |
39
|
|
|
{ |
40
|
3 |
|
return $this->data['update_at']; |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @return mixed |
45
|
|
|
*/ |
46
|
3 |
|
public function getRoles() |
47
|
|
|
{ |
48
|
3 |
|
return $this->data['roles']; |
49
|
|
|
} |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @return bool |
53
|
|
|
*/ |
54
|
3 |
|
public function getAllowMarketing() |
55
|
|
|
{ |
56
|
3 |
|
return $this->data['allow_marketing']; |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @return string |
61
|
|
|
*/ |
62
|
3 |
|
public function getLocale() |
63
|
|
|
{ |
64
|
3 |
|
return $this->data['locale']; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @return string |
69
|
|
|
*/ |
70
|
3 |
|
public function getUsername() |
71
|
|
|
{ |
72
|
3 |
|
return $this->data['username']; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @return string |
77
|
|
|
*/ |
78
|
3 |
|
public function getAuthData() |
79
|
|
|
{ |
80
|
3 |
|
return $this->data['auth_data']; |
81
|
|
|
} |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @return string |
85
|
|
|
*/ |
86
|
3 |
|
public function getEmail() |
87
|
|
|
{ |
88
|
3 |
|
return $this->data['email']; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @return string |
93
|
|
|
*/ |
94
|
3 |
|
public function getFirstName() |
95
|
|
|
{ |
96
|
3 |
|
return $this->data['first_name']; |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* @return string |
101
|
|
|
*/ |
102
|
3 |
|
public function getLastName() |
103
|
|
|
{ |
104
|
3 |
|
return $this->data['last_name']; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* @return string |
109
|
|
|
*/ |
110
|
3 |
|
public function getNickname() |
111
|
|
|
{ |
112
|
3 |
|
return $this->data['nickname']; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
/** |
116
|
|
|
* @return bool |
117
|
|
|
*/ |
118
|
3 |
|
public function getEmailVerified() |
119
|
|
|
{ |
120
|
|
|
return $this->data['email_verified']; |
121
|
3 |
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @return array |
125
|
|
|
*/ |
126
|
|
|
protected static function getFields() |
127
|
|
|
{ |
128
|
|
|
return [ |
129
|
|
|
'id', |
130
|
|
|
'create_at', |
131
|
|
|
'update_at', |
132
|
|
|
'delete_at', |
133
|
|
|
'roles', |
134
|
|
|
'allow_marketing', |
135
|
|
|
'locale', |
136
|
|
|
'username', |
137
|
|
|
'auth_data', |
138
|
|
|
'email', |
139
|
|
|
'email_verified', |
140
|
|
|
'notify_props', |
141
|
|
|
'last_password_update', |
142
|
|
|
'last_name', |
143
|
|
|
'nickname', |
144
|
|
|
'first_name', |
145
|
|
|
]; |
146
|
|
|
} |
147
|
|
|
} |
148
|
|
|
|