74 lines
1.7 KiB
PHP
Executable File
74 lines
1.7 KiB
PHP
Executable File
<?php
|
|
namespace app\common\enum\coach;
|
|
class CoachEnum
|
|
{
|
|
const WORK_STATUS_ONLINE = 1;
|
|
const WORK_STATUS_DOWNLINE = 0;
|
|
|
|
|
|
const WORK_STATUS_FREEZE = 0;
|
|
const WORK_STATUS_NORMAL = 1;
|
|
|
|
const AUDIT_STATUS_WAIT = 0;
|
|
const AUDIT_STATUS_PASS = 1;
|
|
const AUDIT_STATUS_REFUSE = 2;
|
|
|
|
/**
|
|
* @notes 工作状态
|
|
* @param $from
|
|
* @return string|string[]
|
|
* @author cjhao
|
|
* @date 2024/8/21 17:36
|
|
*/
|
|
public static function getWorkStatusDesc($from = true)
|
|
{
|
|
$desc = [
|
|
self::WORK_STATUS_ONLINE => '接单中',
|
|
self::WORK_STATUS_DOWNLINE => '休息中',
|
|
];
|
|
if(true === $from){
|
|
return $desc;
|
|
}
|
|
return $desc[$from] ?? '';
|
|
}
|
|
|
|
/**
|
|
* @notes 服务状态
|
|
* @param $from
|
|
* @return string|string[]
|
|
* @author cjhao
|
|
* @date 2024/8/21 17:36
|
|
*/
|
|
public static function getServerStatusDesc($from = true)
|
|
{
|
|
$desc = [
|
|
self::WORK_STATUS_NORMAL => '正常',
|
|
self::WORK_STATUS_FREEZE => '冻结',
|
|
];
|
|
if(true === $from){
|
|
return $desc;
|
|
}
|
|
return $desc[$from] ?? '';
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 审核状态列表
|
|
* @param $from
|
|
* @return string|string[]
|
|
* @author cjhao
|
|
* @date 2024/8/23 16:14
|
|
*/
|
|
public static function getAuditStatusDesc($from = true)
|
|
{
|
|
$desc = [
|
|
self::AUDIT_STATUS_WAIT => '待审核',
|
|
self::AUDIT_STATUS_PASS => '审核通过',
|
|
self::AUDIT_STATUS_REFUSE => '审核拒绝'
|
|
];
|
|
if(true === $from){
|
|
return $desc;
|
|
}
|
|
return $desc[$from] ?? '';
|
|
}
|
|
} |