Total Complexity | 8 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
19 | class Agent extends Model |
||
20 | { |
||
21 | protected $guarded = []; |
||
22 | |||
23 | protected $userTypes = [ |
||
24 | 0 => 'System', |
||
25 | 1 => 'Human', |
||
26 | 2 => 'Bot' |
||
27 | ]; |
||
28 | |||
29 | public function getUserTypeNameAttribute() |
||
30 | { |
||
31 | $typeid = isset($this->attributes['userTypeId']) ? $this->attributes['userTypeId'] : $this->attributes['userType']; |
||
32 | return $this->userTypes[$typeid]; |
||
33 | } |
||
34 | |||
35 | public function getLastUpdatedTimeAttribute() |
||
36 | { |
||
37 | return new Carbon($this->attributes['lastUpdatedTime']); |
||
38 | } |
||
39 | |||
40 | public function getCurrentStatusStartTimeAttribute() |
||
41 | { |
||
42 | return new Carbon($this->attributes['currentStatusStartTime']); |
||
43 | } |
||
44 | |||
45 | public function getCurrentStatusReasonStartTimeAttribute() |
||
46 | { |
||
47 | return new Carbon($this->attributes['currentStatusReasonStartTime']); |
||
48 | } |
||
49 | |||
50 | public function getStatusMinutesAttribute() |
||
53 | } |
||
54 | |||
55 | public function getAvatarAttribute() |
||
56 | { |
||
58 | } |
||
59 | |||
60 | } |