Files
anmo/server/app/common/enum/GeneratorEnum.php
2025-08-19 14:16:51 +08:00

48 lines
1.5 KiB
PHP
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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;
class GeneratorEnum
{
// 模板类型
const TEMPLATE_TYPE_SINGLE = 0;// 单表
const TEMPLATE_TYPE_TREE = 1; // 树表
// 生成方式
const GENERATE_TYPE_ZIP = 0; // 压缩包下载
const GENERATE_TYPE_MODULE = 1; // 生成到模块
/**
* @notes 获取模板类型描述
* @param bool $value
* @return string|string[]
* @author 段誉
* @date 2022/6/14 11:24
*/
public static function getTemplateTypeDesc($value = true)
{
$data = [
self::TEMPLATE_TYPE_SINGLE => '单表(增删改查)',
self::TEMPLATE_TYPE_TREE => '树表(增删改查)',
];
if ($value === true) {
return $data;
}
return $data[$value] ?? '';
}
}