1 | <?php |
||
9 | class Worker extends Entity |
||
10 | { |
||
11 | const TYPE_CREATOR = 'super'; |
||
12 | const TYPE_DISPATCHER = 'standard'; |
||
13 | |||
14 | protected $name; |
||
15 | protected $phone; |
||
16 | protected $activeTask; |
||
17 | protected $tasks = []; |
||
18 | protected $onDuty; |
||
19 | protected $location; |
||
20 | protected $timeLastSeen; |
||
21 | protected $delayTime; |
||
22 | protected $teams = []; |
||
23 | protected $organization; |
||
24 | protected $metadata = []; |
||
25 | protected $analytics; |
||
26 | protected $vehicle; |
||
27 | protected $timeCreated; |
||
28 | protected $timeLastModified; |
||
29 | |||
30 | protected $endpoint = 'workers'; |
||
31 | |||
32 | protected static $properties = [ |
||
33 | 'id', |
||
34 | 'name', |
||
35 | 'phone', |
||
36 | 'activeTask', |
||
37 | 'tasks', |
||
38 | 'onDuty', |
||
39 | 'location', |
||
40 | 'timeLastSeen', |
||
41 | 'delayTime', |
||
42 | 'teams', |
||
43 | 'organization', |
||
44 | 'vehicle', |
||
45 | 'metadata', |
||
46 | 'analytics', |
||
47 | 'timeCreated', |
||
48 | 'timeLastModified', |
||
49 | ]; |
||
50 | |||
51 | /** |
||
52 | * @return mixed |
||
53 | */ |
||
54 | public function getName() |
||
58 | |||
59 | /** |
||
60 | * @param mixed $name |
||
61 | */ |
||
62 | public function setName($name) |
||
66 | |||
67 | /** |
||
68 | * @return mixed |
||
69 | */ |
||
70 | public function getPhone() |
||
74 | |||
75 | /** |
||
76 | * @return mixed |
||
77 | */ |
||
78 | public function getActiveTask() |
||
82 | |||
83 | /** |
||
84 | * @param mixed $activeTask |
||
85 | */ |
||
86 | public function setActiveTask($activeTask) |
||
90 | |||
91 | /** |
||
92 | * @return array |
||
93 | */ |
||
94 | public function getTasks(): array |
||
98 | |||
99 | /** |
||
100 | * @param array $tasks |
||
101 | */ |
||
102 | public function setTasks(array $tasks) |
||
106 | |||
107 | /** |
||
108 | * @return bool |
||
109 | */ |
||
110 | public function isOnDuty() |
||
114 | |||
115 | /** |
||
116 | * @return mixed |
||
117 | */ |
||
118 | public function getLocation() |
||
122 | |||
123 | /** |
||
124 | * @return \DateTime |
||
125 | */ |
||
126 | public function getTimeLastSeen() |
||
130 | |||
131 | /** |
||
132 | * @return int Amount of time in seconds that a worker is delayed by. |
||
133 | */ |
||
134 | public function getDelayTime() |
||
138 | |||
139 | /** |
||
140 | * @return array |
||
141 | */ |
||
142 | public function getTeams(): array |
||
146 | |||
147 | /** |
||
148 | * @param array $teams |
||
149 | */ |
||
150 | public function setTeams(array $teams) |
||
154 | |||
155 | /** |
||
156 | * @return mixed |
||
157 | */ |
||
158 | public function getOrganization() |
||
162 | |||
163 | /** |
||
164 | * @param mixed $organization |
||
165 | */ |
||
166 | public function setOrganization($organization) |
||
170 | |||
171 | /** |
||
172 | * @return array |
||
173 | */ |
||
174 | public function getMetadata(): array |
||
178 | |||
179 | /** |
||
180 | * @return mixed |
||
181 | */ |
||
182 | public function getAnalytics() |
||
186 | |||
187 | /** |
||
188 | * @return mixed |
||
189 | */ |
||
190 | public function getVehicle() |
||
194 | |||
195 | /** |
||
196 | * @param mixed $vehicle |
||
197 | */ |
||
198 | public function setVehicle($vehicle) |
||
202 | |||
203 | /** |
||
204 | * @return \DateTime |
||
205 | */ |
||
206 | public function getTimeCreated() |
||
210 | |||
211 | /** |
||
212 | * @return \DateTime |
||
213 | */ |
||
214 | public function getTimeLastModified() |
||
218 | } |
||
219 |