69 lines
1.6 KiB
PHP
Executable File
69 lines
1.6 KiB
PHP
Executable File
<?php
|
|
namespace app\common\enum\shop;
|
|
class ShopEnum
|
|
{
|
|
const WORKSTATUSOPEN = 1;
|
|
const WORKSTATUSCOLSE = 0;
|
|
|
|
|
|
const SERVERSTATUSOPEN = 1;
|
|
const SERVERSTATUSCOLSE = 0;
|
|
|
|
const AUDIT_STATUS_WAIT = 0;
|
|
|
|
const AUDIT_STATUS_PASS = 1;
|
|
const AUDIT_STATUS_REFUSE = 2;
|
|
const AUDIT_STATUS_CANCEL = 3;
|
|
|
|
public static function getServerStatus($form = true)
|
|
{
|
|
$desc = [
|
|
self::SERVERSTATUSOPEN => '正常',
|
|
self::SERVERSTATUSCOLSE => '冻结',
|
|
];
|
|
if(true === $form){
|
|
return $desc;
|
|
}
|
|
return $desc[$form] ?? '';
|
|
}
|
|
|
|
/**
|
|
* @notes 工作状态
|
|
* @param $form
|
|
* @return string|string[]
|
|
* @author cjhao
|
|
* @date 2024/10/3 15:42
|
|
*/
|
|
public static function getWorkStatus($form = true)
|
|
{
|
|
$desc = [
|
|
self::WORKSTATUSOPEN => '营业中',
|
|
self::WORKSTATUSCOLSE => '休息中',
|
|
];
|
|
if(true === $form){
|
|
return $desc;
|
|
}
|
|
return $desc[$form] ?? '';
|
|
}
|
|
|
|
/**
|
|
* @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 => '审核拒绝',
|
|
self::AUDIT_STATUS_CANCEL => '取消申请'
|
|
];
|
|
if(true === $from){
|
|
return $desc;
|
|
}
|
|
return $desc[$from] ?? '';
|
|
}
|
|
} |