|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* This file is part of the mucts.com. |
|
4
|
|
|
* |
|
5
|
|
|
* This source file is subject to the MIT license that is bundled |
|
6
|
|
|
* with this source code in the file LICENSE. |
|
7
|
|
|
* |
|
8
|
|
|
* @version 1.0 |
|
9
|
|
|
* @author herry<[email protected]> |
|
10
|
|
|
* @copyright © 2020 MuCTS.com All Rights Reserved. |
|
11
|
|
|
*/ |
|
12
|
|
|
|
|
13
|
|
|
namespace MuCTS\Sobot\OnlineService\GetOnceData\Response\Item; |
|
14
|
|
|
|
|
15
|
|
|
|
|
16
|
|
|
use MuCTS\Sobot\Contracts\Response; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* Class AdminList |
|
20
|
|
|
* @property-read string $agentid 客服id |
|
21
|
|
|
* @property-read string[] $group_name 客服所在技能组名称列表 |
|
22
|
|
|
* @property-read string[] $groupid 客服所在技能组id列表 |
|
23
|
|
|
* @property-read int $count 客服实时接待用户数量 |
|
24
|
|
|
* @property-read string agent_email 客服邮箱 |
|
25
|
|
|
* @property-read int $status 客服状态(1-在线,2-忙碌) |
|
26
|
|
|
* @property-read string $status_cn 客服状态 |
|
27
|
|
|
* @property-read int $status_code 自定义状态:3.小休 4.培训 5.会议 6.用餐 7.活动 |
|
28
|
|
|
* @property-read string $status_code_cn 自定义状态 |
|
29
|
|
|
* @property-read string $agent_name 客服姓名 |
|
30
|
|
|
* @property-read string $agent_face 客服头像 |
|
31
|
|
|
* @property-read string $remark 客服备注 |
|
32
|
|
|
* @property-read string $agent_nick 客服昵称 |
|
33
|
|
|
* @property-read int max_count 客服最大接待量 |
|
34
|
|
|
* @property-read string status_time 状态持续时长 格式:hh:mm:ss |
|
35
|
|
|
* @package MuCTS\Sobot\OnlineService\GetOnceData\Response\Item |
|
36
|
|
|
*/ |
|
37
|
|
|
class AdminList extends Response |
|
38
|
|
|
{ |
|
39
|
|
|
/** |
|
40
|
|
|
* 客服状态 |
|
41
|
|
|
* |
|
42
|
|
|
* @return string |
|
43
|
|
|
*/ |
|
44
|
|
|
public function getStatusCn() |
|
45
|
|
|
{ |
|
46
|
|
|
$status = $this->status; |
|
47
|
|
|
$statusCn = [ |
|
48
|
|
|
1 => '在线', |
|
49
|
|
|
2 => '忙碌' |
|
50
|
|
|
]; |
|
51
|
|
|
return $statusCn[$status] ?? '未知'; |
|
52
|
|
|
} |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* 自定义状态 |
|
56
|
|
|
* |
|
57
|
|
|
* @return string |
|
58
|
|
|
*/ |
|
59
|
|
|
public function getStatusCodeCn() |
|
60
|
|
|
{ |
|
61
|
|
|
$statusCode = $this->status_code; |
|
62
|
|
|
$statusCodeCn = [ |
|
63
|
|
|
3 => '小休', |
|
64
|
|
|
4 => '培训', |
|
65
|
|
|
5 => '会议', |
|
66
|
|
|
6 => '用餐', |
|
67
|
|
|
7 => '活动', |
|
68
|
|
|
]; |
|
69
|
|
|
return $statusCodeCn[$statusCode] ?? '未知'; |
|
70
|
|
|
} |
|
71
|
|
|
} |