| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?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\asset;
- /**
- * 资产枚举
- * Class AssetEnum
- * @package app\common\enum
- */
- class AssetEnum
- {
- /**
- * 状态场景
- */
- const STATTUS_SCENE = [
- self::ENABLE,
- self::DISABLE,
- ];
- //状态类型
- const ENABLE = 1;//启用
- const DISABLE = 0;//禁用
- /**
- * @notes 获取状态描述
- * @param $sceneId
- * @param false $flag
- * @return string|string[]
- * @author 段誉
- * @date 2022/3/29 11:33
- */
- public static function getStatusDesc($sceneId, $flag = false)
- {
- $desc = [
- self::ENABLE => '启用',
- self::DISABLE => '禁用',
- ];
- if ($flag) {
- return $desc;
- }
- return $desc[$sceneId] ?? '';
- }
- }
|