初始版本
This commit is contained in:
69
server/app/common/enum/shop/ShopEnum.php
Executable file
69
server/app/common/enum/shop/ShopEnum.php
Executable file
@@ -0,0 +1,69 @@
|
||||
<?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] ?? '';
|
||||
}
|
||||
}
|
||||
55
server/app/common/enum/shop/ShopUserEnum.php
Executable file
55
server/app/common/enum/shop/ShopUserEnum.php
Executable file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum\shop;
|
||||
|
||||
/**
|
||||
* 管理后台登录终端
|
||||
* Class terminalEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class ShopUserEnum
|
||||
{
|
||||
|
||||
/**
|
||||
* 性别
|
||||
* SEX_OTHER = 未知
|
||||
* SEX_MEN = 男
|
||||
* SEX_WOMAN = 女
|
||||
*/
|
||||
const SEX_OTHER = 0;
|
||||
const SEX_MEN = 1;
|
||||
const SEX_WOMAN = 2;
|
||||
|
||||
|
||||
/**
|
||||
* @notes 性别描述
|
||||
* @param bool $from
|
||||
* @return string|string[]
|
||||
* @author 段誉
|
||||
* @date 2022/9/7 15:05
|
||||
*/
|
||||
public static function getSexDesc($from = true)
|
||||
{
|
||||
$desc = [
|
||||
self::SEX_OTHER => '未知',
|
||||
self::SEX_MEN => '男',
|
||||
self::SEX_WOMAN => '女',
|
||||
];
|
||||
if (true === $from) {
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from] ?? '';
|
||||
}
|
||||
}
|
||||
64
server/app/common/enum/shop/ShopUserTerminalEnum.php
Executable file
64
server/app/common/enum/shop/ShopUserTerminalEnum.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\enum\shop;
|
||||
|
||||
/**
|
||||
* 管理后台登录终端
|
||||
* Class terminalEnum
|
||||
* @package app\common\enum
|
||||
*/
|
||||
class ShopUserTerminalEnum
|
||||
{
|
||||
//const OTHER = 0; //其他来源
|
||||
const WECHAT_MMP = 1; //微信小程序
|
||||
const WECHAT_OA = 2; //微信公众号
|
||||
const H5 = 3;//手机H5登录
|
||||
const PC = 4;//电脑PC
|
||||
const IOS = 5;//苹果app
|
||||
const ANDROID = 6;//安卓app
|
||||
|
||||
|
||||
const ALL_TERMINAL = [
|
||||
self::WECHAT_MMP,
|
||||
self::WECHAT_OA,
|
||||
self::H5,
|
||||
self::PC,
|
||||
self::IOS,
|
||||
self::ANDROID,
|
||||
];
|
||||
|
||||
/**
|
||||
* @notes 获取终端
|
||||
* @param bool $from
|
||||
* @return array|mixed|string
|
||||
* @author cjhao
|
||||
* @date 2021/7/30 18:09
|
||||
*/
|
||||
public static function getTermInalDesc($from = true)
|
||||
{
|
||||
$desc = [
|
||||
self::WECHAT_MMP => '微信小程序',
|
||||
self::WECHAT_OA => '微信公众号',
|
||||
self::H5 => '手机H5',
|
||||
self::PC => '电脑PC',
|
||||
self::IOS => '苹果APP',
|
||||
self::ANDROID => '安卓APP',
|
||||
];
|
||||
if(true === $from){
|
||||
return $desc;
|
||||
}
|
||||
return $desc[$from] ?? '';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user