初始化本地仓库
This commit is contained in:
@@ -0,0 +1,321 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
|
||||
return [
|
||||
[
|
||||
'group_code' => 'upload',
|
||||
'code' => 'local',
|
||||
'name' => '本地存储配置',
|
||||
'content' => [
|
||||
'root' => 'public',
|
||||
'dirname' => 'upload',
|
||||
'domain' => 'http://127.0.0.1:8001',
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => null,
|
||||
],
|
||||
[
|
||||
'group_code' => 'upload',
|
||||
'code' => 'oss',
|
||||
'name' => 'OSS存储配置',
|
||||
'content' => [
|
||||
'accessKeyId' => '',
|
||||
'accessKeySecret' => '',
|
||||
'bucket' => '',
|
||||
'dirname' => '',
|
||||
'domain' => '',
|
||||
'endpoint' => '',
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => null,
|
||||
],
|
||||
[
|
||||
'group_code' => 'upload',
|
||||
'code' => 'cos',
|
||||
'name' => 'COS存储配置',
|
||||
'content' => [
|
||||
'secretId' => '',
|
||||
'secretKey' => '',
|
||||
'bucket' => '',
|
||||
'domain' => '',
|
||||
'region' => '',
|
||||
'dirname' => '',
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => null,
|
||||
],
|
||||
[
|
||||
'group_code' => 'upload',
|
||||
'code' => 'qiniu',
|
||||
'name' => '七牛云存储配置',
|
||||
'content' => [
|
||||
'accessKey' => '',
|
||||
'secretKey' => '',
|
||||
'bucket' => '',
|
||||
'domain' => '',
|
||||
'region' => '',
|
||||
'dirname' => '',
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => null,
|
||||
],
|
||||
[
|
||||
'group_code' => 'upload',
|
||||
'code' => 's3',
|
||||
'name' => 'S3存储配置',
|
||||
'content' => [
|
||||
'key' => '',
|
||||
'secret' => '',
|
||||
'bucket' => '',
|
||||
'dirname' => '',
|
||||
'domain' => '',
|
||||
'region' => '',
|
||||
'version' => '',
|
||||
'endpoint' => '',
|
||||
'acl' => '',
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => null,
|
||||
],
|
||||
[
|
||||
'group_code' => 'setting',
|
||||
'code' => 'email',
|
||||
'name' => '邮箱设置',
|
||||
'content' => [
|
||||
'Host' => 'smtp.qq.com',
|
||||
'Port' => '465',
|
||||
'Username' => '',
|
||||
'Password' => '',
|
||||
'SMTPSecure' => 'ssl',
|
||||
'From' => '',
|
||||
'FromName' => '',
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'group_code' => 'setting',
|
||||
'code' => 'upload',
|
||||
'name' => '上传设置',
|
||||
'content' => [
|
||||
'mode' => 'local',
|
||||
'single_limit' => '1024',
|
||||
'total_limit' => '1024',
|
||||
'nums' => '100',
|
||||
'exclude' => 'php,ext,exe',
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'group_code' => 'system',
|
||||
'code' => 'site_setting',
|
||||
'name' => '站点设置',
|
||||
'content' => [
|
||||
'site_open' => 1,
|
||||
'site_url' => 'http://127.0.0.1:8001',
|
||||
'site_name' => 'MD-Admin',
|
||||
'site_logo' => '/upload/logo.png',
|
||||
'site_network_security' => '',
|
||||
'site_record_no' => '',
|
||||
'site_icp_url' => 'https://beian.miit.gov.cn/',
|
||||
'site_network_security_url' => '',
|
||||
'site_description' => '极速开发框架',
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'group_code' => 'setting',
|
||||
'code' => 'sms',
|
||||
'name' => '短信设置',
|
||||
'content' => [
|
||||
'access_key_id' => '',
|
||||
'access_key_secret' => '',
|
||||
'enable' => 1,
|
||||
'sign_name' => '【码动开源】,你的验证码是{code},有效期5分钟。',
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'code' => 'web_login_config',
|
||||
'name' => '站点登录配置',
|
||||
'content' => [
|
||||
'is_username' => 1,
|
||||
'is_mobile' => 0,
|
||||
'is_auth_register' => 1,
|
||||
'is_bind_mobile' => 0,
|
||||
'is_wechat_scan' => 0,
|
||||
'agreement_show' => 0,
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'group_code' => 'web',
|
||||
'code' => 'web_site_setting',
|
||||
'name' => '前台站点设置',
|
||||
'content' => [
|
||||
"site_name" => "",
|
||||
"site_url" => "",
|
||||
"seo_title" => "",
|
||||
"seo_keywords" => "",
|
||||
"seo_description" => "",
|
||||
"copyright" => "",
|
||||
"icp" => "",
|
||||
"icp_url" => "https:\/\/beian.miit.gov.cn",
|
||||
"network_security" => "",
|
||||
"network_security_url" => "",
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => '前台站点版权和友情链接配置',
|
||||
],
|
||||
[
|
||||
'group_code' => 'web',
|
||||
'code' => 'web_search_config',
|
||||
'name' => '前台搜索配置',
|
||||
'content' => [
|
||||
'keyword' => '',
|
||||
'keyword_enabled' => 0,
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => '前台站点搜索引擎关键字配置',
|
||||
],
|
||||
[
|
||||
'group_code' => 'web',
|
||||
'code' => 'web_analytics_config',
|
||||
'name' => '前台统计分析配置',
|
||||
'content' => [
|
||||
'baidu_tongji_code' => '',
|
||||
'baidu_tongji_enabled' => 0,
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => '前台站点统计分析配置(百度统计等)',
|
||||
],
|
||||
[
|
||||
'group_code' => 'system',
|
||||
'code' => 'app_about_setting',
|
||||
'name' => '关于我们设置',
|
||||
'content' => [
|
||||
'user_service_agreement' => '',
|
||||
'privacy_policy' => '',
|
||||
'icp_number' => '',
|
||||
'report_email' => '',
|
||||
'business_contact' => '',
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => '移动端关于我们页面配置',
|
||||
],
|
||||
[
|
||||
'group_code' => 'web',
|
||||
'code' => 'web_payment_config',
|
||||
'name' => '前台支付配置',
|
||||
'content' => [
|
||||
'is_wechat_enabled' => 0,
|
||||
'is_alipay_enabled' => 0,
|
||||
],
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'created_by' => 1,
|
||||
'updated_at' => time(),
|
||||
'updated_by' => 1,
|
||||
'deleted_at' => null,
|
||||
'remark' => '前台站点支付开关配置(微信、支付宝)',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,711 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
|
||||
return [
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '所属分组',
|
||||
'code' => 'sys_dict_group_code',
|
||||
'sort' => 1,
|
||||
'data_type' => 1,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '默认分组',
|
||||
'value' => 'value1',
|
||||
'code' => 'default',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '其他',
|
||||
'value' => 'value2',
|
||||
'code' => 'other',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '字典类型',
|
||||
'code' => 'sys_dict_data_type',
|
||||
'sort' => 1,
|
||||
'data_type' => 2,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '字符串',
|
||||
'value' => 1,
|
||||
'code' => 'sys_dict_data_type',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '整型',
|
||||
'value' => 2,
|
||||
'code' => 'sys_dict_data_type',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '是否',
|
||||
'code' => 'yes_no',
|
||||
'sort' => 1,
|
||||
'data_type' => 2,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '是',
|
||||
'value' => 1,
|
||||
'code' => 'yes_no',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '否',
|
||||
'value' => 0,
|
||||
'code' => 'yes_no',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '性别',
|
||||
'code' => 'sex',
|
||||
'sort' => 1,
|
||||
'data_type' => 2,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '男',
|
||||
'value' => 1,
|
||||
'code' => 'sex',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '女',
|
||||
'value' => 2,
|
||||
'code' => 'sex',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '菜单类型',
|
||||
'code' => 'sys_menu_type',
|
||||
'sort' => 1,
|
||||
'data_type' => 2,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '目录',
|
||||
'value' => 1,
|
||||
'code' => 'sys_menu_type',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '菜单',
|
||||
'value' => 2,
|
||||
'code' => 'sys_menu_type',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '按钮',
|
||||
'value' => 3,
|
||||
'code' => 'sys_menu_type',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '接口',
|
||||
'value' => 4,
|
||||
'code' => 'sys_menu_type',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '菜单打开类型',
|
||||
'code' => 'sys_menu_open_type',
|
||||
'sort' => 1,
|
||||
'data_type' => 2,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '无',
|
||||
'value' => 0,
|
||||
'code' => 'sys_menu_open_type',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '组件',
|
||||
'value' => 1,
|
||||
'code' => 'sys_menu_open_type',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '内链',
|
||||
'value' => 2,
|
||||
'code' => 'sys_menu_open_type',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '外链',
|
||||
'value' => 3,
|
||||
'code' => 'sys_menu_open_type',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '是否超级管理员',
|
||||
'code' => 'sys_user_admin_type',
|
||||
'sort' => 1,
|
||||
'data_type' => 2,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '超级管理员',
|
||||
'value' => 1,
|
||||
'code' => 'sys_user_admin_type',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '普通管理员',
|
||||
'value' => 2,
|
||||
'code' => 'sys_user_admin_type',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '角色类型',
|
||||
'code' => 'sys_role_role_type',
|
||||
'sort' => 1,
|
||||
'data_type' => 2,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '普通角色',
|
||||
'value' => 1,
|
||||
'code' => 'sys_role_role_type',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '数据角色',
|
||||
'value' => 2,
|
||||
'code' => 'sys_role_role_type',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '请求类型',
|
||||
'code' => 'request_mode',
|
||||
'sort' => 1,
|
||||
'data_type' => 1,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => 'GET',
|
||||
'value' => 'GET',
|
||||
'code' => 'request_mode',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => 'POST',
|
||||
'value' => 'POST',
|
||||
'code' => 'request_mode',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => 'PUT',
|
||||
'value' => 'PUT',
|
||||
'code' => 'request_mode',
|
||||
'sort' => 3,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => 'DELETE',
|
||||
'value' => 'DELETE',
|
||||
'code' => 'request_mode',
|
||||
'sort' => 4,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '定时任务模式',
|
||||
'code' => 'monitor_crontab_mode',
|
||||
'sort' => 1,
|
||||
'data_type' => 2,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '单次',
|
||||
'value' => 0,
|
||||
'code' => 'monitor_crontab_mode',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '循环',
|
||||
'value' => 1,
|
||||
'code' => 'monitor_crontab_mode',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '定时任务类型',
|
||||
'code' => 'monitor_crontab_type',
|
||||
'sort' => 1,
|
||||
'data_type' => 2,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => 'url',
|
||||
'value' => 1,
|
||||
'code' => 'monitor_crontab_type',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => 'eval',
|
||||
'value' => 2,
|
||||
'code' => 'monitor_crontab_type',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => 'shell',
|
||||
'value' => 3,
|
||||
'code' => 'monitor_crontab_type',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '定时任务执行周期',
|
||||
'code' => 'monitor_crontab_cycle',
|
||||
'sort' => 1,
|
||||
'data_type' => 2,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '每天',
|
||||
'value' => 1,
|
||||
'code' => 'monitor_crontab_cycle',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '每小时',
|
||||
'value' => 2,
|
||||
'code' => 'monitor_crontab_cycle',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => 'N小时',
|
||||
'value' => 3,
|
||||
'code' => 'monitor_crontab_cycle',
|
||||
'sort' => 3,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => 'N分钟',
|
||||
'value' => 4,
|
||||
'code' => 'monitor_crontab_cycle',
|
||||
'sort' => 4,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => 'N秒',
|
||||
'value' => 5,
|
||||
'code' => 'monitor_crontab_cycle',
|
||||
'sort' => 5,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '每星期',
|
||||
'value' => 6,
|
||||
'code' => 'monitor_crontab_cycle',
|
||||
'sort' => 6,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '每年',
|
||||
'value' => 7,
|
||||
'code' => 'monitor_crontab_cycle',
|
||||
'sort' => 7,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '每年',
|
||||
'value' => 8,
|
||||
'code' => 'monitor_crontab_cycle',
|
||||
'sort' => 8,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => 'CPU监控',
|
||||
'code' => 'monitor_server_cpu',
|
||||
'sort' => 1,
|
||||
'data_type' => 1,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '型号',
|
||||
'value' => 'cpu_name',
|
||||
'code' => 'monitor_server_cpu',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '物理核心数',
|
||||
'value' => 'physical_cores',
|
||||
'code' => 'monitor_server_cpu',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '逻辑核心数',
|
||||
'value' => 'logical_cores',
|
||||
'code' => 'monitor_server_cpu',
|
||||
'sort' => 3,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '缓存大小(MB)',
|
||||
'value' => 'cache_size_mb',
|
||||
'code' => 'monitor_server_cpu',
|
||||
'sort' => 4,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => 'CPU使用百分比',
|
||||
'value' => 'cpu_usage_percentage',
|
||||
'code' => 'monitor_server_cpu',
|
||||
'sort' => 5,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '空闲 CPU 百分比',
|
||||
'value' => 'free_cpu_percentage',
|
||||
'code' => 'monitor_server_cpu',
|
||||
'sort' => 6,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '内存监控',
|
||||
'code' => 'monitor_server_memory',
|
||||
'sort' => 1,
|
||||
'data_type' => 1,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '内存使用率',
|
||||
'value' => 'memory_usage_rate',
|
||||
'code' => 'monitor_server_memory',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '总内存',
|
||||
'value' => 'total_memory',
|
||||
'code' => 'monitor_server_memory',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '可用内存',
|
||||
'value' => 'available_memory',
|
||||
'code' => 'monitor_server_memory',
|
||||
'sort' => 3,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '已用内存',
|
||||
'value' => 'used_memory',
|
||||
'code' => 'monitor_server_memory',
|
||||
'sort' => 4,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => 'PHP内存使用',
|
||||
'value' => 'php_memory_usage',
|
||||
'code' => 'monitor_server_memory',
|
||||
'sort' => 5,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'group_code' => 'default',
|
||||
'name' => '配置分组',
|
||||
'code' => 'sys_group',
|
||||
'sort' => 1,
|
||||
'data_type' => 1,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'items' => [
|
||||
[
|
||||
'label' => '系统配置',
|
||||
'value' => 'system_config',
|
||||
'code' => 'sys_group',
|
||||
'sort' => 1,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
[
|
||||
'label' => '上传配置',
|
||||
'value' => 'system_storage',
|
||||
'code' => 'sys_group',
|
||||
'sort' => 2,
|
||||
'enabled' => 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => '',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
|
||||
return [
|
||||
[
|
||||
'app' => 'web',
|
||||
'category' => 1,
|
||||
'source' => 'system',
|
||||
'code' => null,
|
||||
'name' => '首页',
|
||||
'url' => '/',
|
||||
'icon' => 'ant-design:home-outlined',
|
||||
'level' => 1,
|
||||
'type' => 2,
|
||||
'sort' => -1,
|
||||
'target' => 1,
|
||||
'is_show' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => null
|
||||
],
|
||||
[
|
||||
'app' => 'web',
|
||||
'category' => 2,
|
||||
'source' => 'system',
|
||||
'code' => 'test3',
|
||||
'name' => '我的账户',
|
||||
'url' => null,
|
||||
'icon' => 'ant-design:idcard-outlined',
|
||||
'level' => 1,
|
||||
'type' => 1,
|
||||
'sort' => 999,
|
||||
'target' => 1,
|
||||
'is_show' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => null,
|
||||
'children' => [
|
||||
[
|
||||
'app' => 'web',
|
||||
'category' => 2,
|
||||
'source' => 'system',
|
||||
'code' => '',
|
||||
'name' => '修改密码',
|
||||
'url' => '/member/password',
|
||||
'icon' => 'ant-design:lock-outlined',
|
||||
'level' => 1,
|
||||
'type' => 2,
|
||||
'sort' => 999,
|
||||
'target' => 1,
|
||||
'is_show' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => null
|
||||
],
|
||||
[
|
||||
'app' => 'web',
|
||||
'category' => 2,
|
||||
'source' => 'system',
|
||||
'code' => '',
|
||||
'name' => '用户设置',
|
||||
'url' => '/member/settings',
|
||||
'icon' => 'ant-design:setting-outlined',
|
||||
'level' => 1,
|
||||
'type' => 2,
|
||||
'sort' => 10,
|
||||
'target' => 1,
|
||||
'is_show' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => null
|
||||
],
|
||||
[
|
||||
'app' => 'web',
|
||||
'category' => 2,
|
||||
'source' => 'system',
|
||||
'code' => '',
|
||||
'name' => '个人资料',
|
||||
'url' => '/member/profile',
|
||||
'icon' => 'ant-design:user-outlined',
|
||||
'level' => 1,
|
||||
'type' => 2,
|
||||
'sort' => -1,
|
||||
'target' => 1,
|
||||
'is_show' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => null
|
||||
],
|
||||
[
|
||||
'app' => 'web',
|
||||
'category' => 2,
|
||||
'source' => 'system',
|
||||
'code' => 'test1',
|
||||
'name' => '积分记录',
|
||||
'url' => '/member/points',
|
||||
'icon' => 'ant-design:gift-outlined',
|
||||
'level' => 1,
|
||||
'type' => 2,
|
||||
'sort' => 999,
|
||||
'target' => 1,
|
||||
'is_show' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => null
|
||||
],
|
||||
[
|
||||
'app' => 'web',
|
||||
'category' => 2,
|
||||
'source' => 'system',
|
||||
'code' => 'test2',
|
||||
'name' => '每日签到',
|
||||
'url' => '/member/sign',
|
||||
'icon' => 'ant-design:calendar-outlined',
|
||||
'level' => 1,
|
||||
'type' => 2,
|
||||
'sort' => 999,
|
||||
'target' => 1,
|
||||
'is_show' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
'deleted_at' => null
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,829 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: http://www.madong.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* 系统配置数据
|
||||
*/
|
||||
return [
|
||||
[
|
||||
"group_code" => "local",
|
||||
"code" => "root",
|
||||
"name" => "",
|
||||
"content" => "public",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "local",
|
||||
"code" => "dirname",
|
||||
"name" => "",
|
||||
"content" => "upload",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "local",
|
||||
"code" => "domain",
|
||||
"name" => "",
|
||||
"content" => "http=>>//43.138.153.216=>>8899/",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "oss",
|
||||
"code" => "accessKeyId",
|
||||
"name" => "",
|
||||
"content" => "1",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "oss",
|
||||
"code" => "accessKeySecret",
|
||||
"name" => "",
|
||||
"content" => "2",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "oss",
|
||||
"code" => "bucket",
|
||||
"name" => "",
|
||||
"content" => "3",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "oss",
|
||||
"code" => "dirname",
|
||||
"name" => "",
|
||||
"content" => "4",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "oss",
|
||||
"code" => "domain",
|
||||
"name" => "",
|
||||
"content" => "5",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "oss",
|
||||
"code" => "endpoint",
|
||||
"name" => "",
|
||||
"content" => "6",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "oss",
|
||||
"code" => "remark",
|
||||
"name" => "",
|
||||
"content" => "7",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "cos",
|
||||
"code" => "secretId",
|
||||
"name" => "",
|
||||
"content" => "11",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "cos",
|
||||
"code" => "secretKey",
|
||||
"name" => "",
|
||||
"content" => "22",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "cos",
|
||||
"code" => "bucket",
|
||||
"name" => "",
|
||||
"content" => "33",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "cos",
|
||||
"code" => "dirname",
|
||||
"name" => "",
|
||||
"content" => "44",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "cos",
|
||||
"code" => "domain",
|
||||
"name" => "",
|
||||
"content" => "55",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "cos",
|
||||
"code" => "region",
|
||||
"name" => "",
|
||||
"content" => "66",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "cos",
|
||||
"code" => "remark",
|
||||
"name" => "",
|
||||
"content" => "77",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "qiniu",
|
||||
"code" => "accessKey",
|
||||
"name" => "",
|
||||
"content" => "99",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "qiniu",
|
||||
"code" => "secretKey",
|
||||
"name" => "",
|
||||
"content" => "88",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "qiniu",
|
||||
"code" => "bucket",
|
||||
"name" => "",
|
||||
"content" => "7",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "qiniu",
|
||||
"code" => "dirname",
|
||||
"name" => "",
|
||||
"content" => "78",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "qiniu",
|
||||
"code" => "domain",
|
||||
"name" => "",
|
||||
"content" => "8",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "qiniu",
|
||||
"code" => "region",
|
||||
"name" => "",
|
||||
"content" => "",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "qiniu",
|
||||
"code" => "remark",
|
||||
"name" => "",
|
||||
"content" => "897",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "s3",
|
||||
"code" => "key",
|
||||
"name" => "",
|
||||
"content" => "12",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "s3",
|
||||
"code" => "secret",
|
||||
"name" => "",
|
||||
"content" => "12",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "s3",
|
||||
"code" => "bucket",
|
||||
"name" => "",
|
||||
"content" => "12",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "s3",
|
||||
"code" => "dirname",
|
||||
"name" => "",
|
||||
"content" => "12",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "s3",
|
||||
"code" => "domain",
|
||||
"name" => "",
|
||||
"content" => "12",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "s3",
|
||||
"code" => "endpoint",
|
||||
"name" => "",
|
||||
"content" => "12",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "s3",
|
||||
"code" => "region",
|
||||
"name" => "",
|
||||
"content" => "12",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "s3",
|
||||
"code" => "acl",
|
||||
"name" => "",
|
||||
"content" => "6",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "s3",
|
||||
"code" => "remark",
|
||||
"name" => "",
|
||||
"content" => "4",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "email_setting",
|
||||
"code" => "SMTPSecure",
|
||||
"name" => "",
|
||||
"content" => "ssl",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "email_setting",
|
||||
"code" => "Host",
|
||||
"name" => "",
|
||||
"content" => "smtp.qq.com",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "email_setting",
|
||||
"code" => "Port",
|
||||
"name" => "",
|
||||
"content" => "465",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "email_setting",
|
||||
"code" => "Username",
|
||||
"name" => "",
|
||||
"content" => "kzhzjdyw888@qq.com",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "email_setting",
|
||||
"code" => "Password",
|
||||
"name" => "",
|
||||
"content" => "",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "email_setting",
|
||||
"code" => "From",
|
||||
"name" => "",
|
||||
"content" => "",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "email_setting",
|
||||
"code" => "FromName",
|
||||
"name" => "",
|
||||
"content" => "kzhzjdyw888@qq.com",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "basic_upload_setting",
|
||||
"code" => "mode",
|
||||
"name" => "上传模式",
|
||||
"content" => "local",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "basic_upload_setting",
|
||||
"code" => "single_limit",
|
||||
"name" => "上传大小",
|
||||
"content" => "1024",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "basic_upload_setting",
|
||||
"code" => "total_limit",
|
||||
"name" => "文件限制",
|
||||
"content" => "1024",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "basic_upload_setting",
|
||||
"code" => "nums",
|
||||
"name" => "数量限制",
|
||||
"content" => "10",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "basic_upload_setting",
|
||||
"code" => "exclude",
|
||||
"name" => "不允许文件类型",
|
||||
"content" => "php,ext,exe",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "site_setting",
|
||||
"code" => "site_open",
|
||||
"name" => "站点开启",
|
||||
"content" => "1",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "site_setting",
|
||||
"code" => "site_url",
|
||||
"name" => "网站地址",
|
||||
"content" => "http://127.0.0.1:8998",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "site_setting",
|
||||
"code" => "site_name",
|
||||
"name" => "站点名称",
|
||||
"content" => "madong-admin",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "site_setting",
|
||||
"code" => "site_logo",
|
||||
"name" => "站点Logo",
|
||||
"content" => "https://madong.tech/assets/images/logo.svg",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "site_setting",
|
||||
"code" => "site_network_security",
|
||||
"name" => "网备案号",
|
||||
"content" => "2024042441号-2",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "site_setting",
|
||||
"code" => "site_description",
|
||||
"name" => "网站描述",
|
||||
"content" => "快速开发框架",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "site_setting",
|
||||
"code" => "site_record_no",
|
||||
"name" => "网站ICP",
|
||||
"content" => "2024042442",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "site_setting",
|
||||
"code" => "site_icp_url",
|
||||
"name" => "ICP URL",
|
||||
"content" => "https://beian.miit.gov.cn/",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "site_setting",
|
||||
"code" => "site_network_security_url",
|
||||
"name" => "网安备案链接",
|
||||
"content" => "",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "sms_setting",
|
||||
"code" => "enable",
|
||||
"name" => "是否开启",
|
||||
"content" => "1",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "sms_setting",
|
||||
"code" => "access_key_id",
|
||||
"name" => "access_key_id",
|
||||
"content" => "234813346262818816",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "sms_setting",
|
||||
"code" => "access_key_secret",
|
||||
"name" => "access_key_secret",
|
||||
"content" => "238164553517768704",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
[
|
||||
"group_code" => "sms_setting",
|
||||
"code" => "sign_name",
|
||||
"name" => "sign_name",
|
||||
"content" => "【码动开源】,你的验证码是{code},有效期5分钟。",
|
||||
"is_sys" => "0",
|
||||
"enabled" => "1",
|
||||
"created_at" => time(),
|
||||
"created_by" => 1,
|
||||
"updated_at" => time(),
|
||||
"updated_by" => 1,
|
||||
"deleted_at" => null,
|
||||
"remark" => "",
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of webman.
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the MIT-LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @author walkor<walkor@workerman.net>
|
||||
* @copyright walkor<walkor@workerman.net>
|
||||
* @link http://www.workerman.net/
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
|
||||
return [
|
||||
// 默认数据库
|
||||
'default' => 'mysql',
|
||||
'connections' => [
|
||||
'mysql' => [
|
||||
'driver' => 'mysql',
|
||||
'host' => env('DB_HOST', ''),
|
||||
'port' => env('DB_PORT', 3306),
|
||||
'database' => env('DB_DATABASE',''),
|
||||
'username' => env('DB_USERNAME',''),
|
||||
'password' => env('DB_PASSWORD',''),
|
||||
'unix_socket' => '',
|
||||
'charset' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_unicode_ci',
|
||||
'prefix' => env('DB_PREFIX', 'ma_'),
|
||||
'strict' => true,
|
||||
'engine' => null,
|
||||
'pool' => [
|
||||
// 连接池配置,仅支持swoole/swow驱动
|
||||
'max_connections' => 5, // 最大连接数
|
||||
'min_connections' => 1, // 最小连接数
|
||||
'wait_timeout' => 3, // 从连接池获取连接等待的最大时间,超时后会抛出异常
|
||||
'idle_timeout' => 60, // 连接池中连接最大空闲时间,超时后会关闭回收,直到连接数为min_connections
|
||||
'heartbeat_interval' => 50, // 连接池心跳检测时间,单位秒,建议小于60秒
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
if (!$schema->hasTable('sys_feedback')) {
|
||||
$schema->create('sys_feedback', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('type', 30)->comment('反馈类型:bug/suggestion/correction');
|
||||
$table->text('content')->comment('问题描述');
|
||||
$table->string('contact', 100)->nullable()->comment('联系方式');
|
||||
$table->text('images')->nullable()->comment('截图附件,JSON 数组');
|
||||
$table->string('source', 10)->default('app')->comment('来源:app/web');
|
||||
$table->bigInteger('created_by')->nullable()->comment('提交会员ID');
|
||||
$table->text('reply_content')->nullable()->comment('管理员回复内容');
|
||||
$table->bigInteger('reply_by')->nullable()->comment('回复管理员ID');
|
||||
$table->bigInteger('reply_at')->nullable()->comment('回复时间');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('更新时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
$table->index('type');
|
||||
$table->index('source');
|
||||
$table->index('created_by');
|
||||
$table->index('created_at');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
$schema->dropIfExists('sys_feedback');
|
||||
}
|
||||
};
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
if ($schema->hasTable('sys_feedback') && !$schema->hasColumn('sys_feedback', 'created_by')) {
|
||||
$schema->table('sys_feedback', function (Blueprint $table) {
|
||||
$table->bigInteger('created_by')->nullable()->after('source')->comment('提交会员ID');
|
||||
$table->index('created_by');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
if ($schema->hasTable('sys_feedback') && $schema->hasColumn('sys_feedback', 'created_by')) {
|
||||
$schema->table('sys_feedback', function (Blueprint $table) {
|
||||
$table->dropIndex(['created_by']);
|
||||
$table->dropColumn('created_by');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
if (!$schema->hasTable('sys_feedback')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$schema->hasColumn('sys_feedback', 'reply_content')) {
|
||||
$schema->table('sys_feedback', function (Blueprint $table) {
|
||||
$table->text('reply_content')->nullable()->after('created_by')->comment('管理员回复内容');
|
||||
});
|
||||
}
|
||||
if (!$schema->hasColumn('sys_feedback', 'reply_by')) {
|
||||
$schema->table('sys_feedback', function (Blueprint $table) {
|
||||
$table->bigInteger('reply_by')->nullable()->after('reply_content')->comment('回复管理员ID');
|
||||
});
|
||||
}
|
||||
if (!$schema->hasColumn('sys_feedback', 'reply_at')) {
|
||||
$schema->table('sys_feedback', function (Blueprint $table) {
|
||||
$table->bigInteger('reply_at')->nullable()->after('reply_by')->comment('回复时间');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
if (!$schema->hasTable('sys_feedback')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$columns = array_filter(['reply_content', 'reply_by', 'reply_at'], fn (string $column) => $schema->hasColumn('sys_feedback', $column));
|
||||
if ($columns !== []) {
|
||||
$schema->table('sys_feedback', function (Blueprint $table) use ($columns) {
|
||||
$table->dropColumn($columns);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use app\model\system\Config;
|
||||
use core\uuid\Snowflake;
|
||||
use Illuminate\Database\Schema\Builder as SchemaBuilder;
|
||||
|
||||
return new class {
|
||||
public function up(SchemaBuilder $schema): void
|
||||
{
|
||||
if (!$schema->hasTable('sys_config')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Config::query()->where('code', 'app_about_setting')->exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$now = time();
|
||||
Config::create([
|
||||
'id' => Snowflake::generate(),
|
||||
'group_code' => 'system',
|
||||
'code' => 'app_about_setting',
|
||||
'name' => '关于我们设置',
|
||||
'content' => json_encode([
|
||||
'user_service_agreement' => '',
|
||||
'privacy_policy' => '',
|
||||
'icp_number' => '',
|
||||
'report_email' => '',
|
||||
'business_contact' => '',
|
||||
], JSON_UNESCAPED_UNICODE),
|
||||
'is_sys' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
'remark' => '移动端关于我们页面配置',
|
||||
]);
|
||||
}
|
||||
|
||||
public function down(SchemaBuilder $schema): void
|
||||
{
|
||||
if ($schema->hasTable('sys_config')) {
|
||||
Config::query()->where('code', 'app_about_setting')->delete();
|
||||
}
|
||||
}
|
||||
};
|
||||
+600
@@ -0,0 +1,600 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 创建系统基础表
|
||||
* 表:
|
||||
* - sys_admin (用户信息表)
|
||||
* - sys_admin_casbin (用户与策略关联表)
|
||||
* - sys_admin_dept (用户与部门关联表)
|
||||
* - sys_admin_post (用户与岗位关联表)
|
||||
* - sys_admin_role (用户与角色关联表)
|
||||
* - sys_casbin_rule (Casbin策略规则表)
|
||||
* - sys_config (配置表)
|
||||
* - sys_crontab (定时任务表)
|
||||
* - sys_crontab_log (定时任务日志表)
|
||||
* - sys_dept (部门信息表)
|
||||
* - sys_dept_leader (部门领导关联表)
|
||||
* - sys_dict (字典类型表)
|
||||
* - sys_dict_item (字典数据表)
|
||||
* - sys_login_log (登录日志表)
|
||||
* - sys_menu (菜单表)
|
||||
* - sys_message (系统消息表)
|
||||
* - sys_notice (通知公告表)
|
||||
* - sys_operate_log (系统操作日志表)
|
||||
* - sys_post (岗位信息表)
|
||||
* - sys_rate_limiter (限流规则表)
|
||||
* - sys_rate_restrictions (限制访问名单表)
|
||||
* - sys_recycle_bin (数据回收记录表)
|
||||
* - sys_review (审核记录表)
|
||||
* - sys_role (角色信息表)
|
||||
* - sys_role_casbin (角色与策略关联表)
|
||||
* - sys_role_dept (角色与部门关联表)
|
||||
* - sys_role_menu (角色与菜单关联表)
|
||||
* - sys_role_scope_dept (角色与部门关联表)
|
||||
* - sys_route (路由规则表)
|
||||
* - sys_route_cate (路由规则分组表)
|
||||
* - sys_upload (文件信息表)
|
||||
*/
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
// 用户信息表
|
||||
if (!$schema->hasTable('sys_admin')) {
|
||||
$schema->create('sys_admin', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('用户ID');
|
||||
$table->string('user_name', 20)->unique()->comment('账号');
|
||||
$table->string('real_name', 30)->nullable()->comment('用户');
|
||||
$table->string('nick_name', 100)->nullable()->comment('昵称');
|
||||
$table->string('password', 100)->comment('密码');
|
||||
$table->tinyInteger('is_super')->default(0)->comment('用户类型:1系统用户 0普通用户');
|
||||
$table->string('mobile_phone', 11)->nullable()->comment('手机');
|
||||
$table->string('email', 50)->nullable()->comment('用户邮箱');
|
||||
$table->string('avatar', 255)->nullable()->comment('用户头像');
|
||||
$table->string('signed', 255)->nullable()->comment('个人签名');
|
||||
$table->string('dashboard', 100)->nullable()->comment('后台首页类型');
|
||||
$table->bigInteger('dept_id')->nullable()->comment('部门ID');
|
||||
$table->smallInteger('enabled')->default(1)->comment('状态: 1正常 0停用');
|
||||
$table->string('login_ip', 45)->nullable()->comment('最后登陆IP');
|
||||
$table->integer('login_time')->nullable()->comment('最后登陆时间');
|
||||
$table->text('backend_setting')->nullable()->comment('后台设置数据');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建者');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新者');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->unsignedInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
$table->tinyInteger('sex')->default(0)->comment('0=未知 1=男 2=女');
|
||||
$table->longText('remark')->nullable()->comment('备注');
|
||||
$table->string('birthday', 50)->nullable()->comment('生日');
|
||||
$table->string('tel', 255)->nullable()->comment('座机');
|
||||
$table->smallInteger('is_locked')->default(0)->comment('是否锁定: 1是 0否');
|
||||
});
|
||||
}
|
||||
|
||||
// 用户与部门职位关联表
|
||||
if (!$schema->hasTable('sys_admin_main')) {
|
||||
$schema->create('sys_admin_main', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->bigInteger('admin_id')->comment('用户ID(外键)');
|
||||
$table->bigInteger('main_dept_id')->nullable()->comment('主部门ID');
|
||||
$table->bigInteger('main_post_id')->nullable()->comment('主职位ID');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->index('admin_id', 'idx_admin_id');
|
||||
$table->index('main_dept_id', 'idx_main_dept_id');
|
||||
$table->index('main_post_id', 'idx_main_post_id');
|
||||
});
|
||||
}
|
||||
|
||||
// 用户与部门关联表
|
||||
if (!$schema->hasTable('sys_admin_dept')) {
|
||||
$schema->create('sys_admin_dept', function (Blueprint $table) {
|
||||
$table->bigInteger('admin_id')->comment('用户主键');
|
||||
$table->bigInteger('dept_id')->comment('角色主键');
|
||||
$table->primary(['admin_id', 'dept_id']);
|
||||
});
|
||||
}
|
||||
|
||||
// 用户与岗位关联表
|
||||
if (!$schema->hasTable('sys_admin_post')) {
|
||||
$schema->create('sys_admin_post', function (Blueprint $table) {
|
||||
$table->bigInteger('admin_id')->comment('管理员主键');
|
||||
$table->bigInteger('post_id')->comment('岗位主键');
|
||||
$table->primary(['admin_id', 'post_id']);
|
||||
});
|
||||
}
|
||||
|
||||
// 用户与角色关联表
|
||||
if (!$schema->hasTable('sys_admin_role')) {
|
||||
$schema->create('sys_admin_role', function (Blueprint $table) {
|
||||
$table->bigInteger('admin_id')->comment('管理员主键');
|
||||
$table->bigInteger('role_id')->comment('角色主键');
|
||||
$table->primary(['admin_id', 'role_id']);
|
||||
});
|
||||
}
|
||||
|
||||
// 配置表
|
||||
if (!$schema->hasTable('sys_config')) {
|
||||
$schema->create('sys_config', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('配置ID');
|
||||
$table->string('group_code', 64)->nullable()->comment('分组编码');
|
||||
$table->string('code', 64)->comment('唯一编码');
|
||||
$table->string('name', 64)->comment('配置名称');
|
||||
$table->longText('content')->nullable()->comment('配置内容');
|
||||
$table->tinyInteger('is_sys')->default(0)->comment('是否系统');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('是否启用');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建用户');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('更新时间');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新用户');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('是否删除');
|
||||
$table->longText('remark')->nullable()->comment('备注');
|
||||
$table->index('code');
|
||||
$table->index('group_code');
|
||||
});
|
||||
}
|
||||
|
||||
// 定时任务表
|
||||
if (!$schema->hasTable('sys_crontab')) {
|
||||
$schema->create('sys_crontab', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('biz_id', 36)->nullable()->comment('业务id');
|
||||
$table->string('title', 255)->comment('任务标题');
|
||||
$table->tinyInteger('type')->default(1)->comment('任务类型: 1 url, 2 eval, 3 shell');
|
||||
$table->tinyInteger('task_cycle')->default(1)->comment('任务周期');
|
||||
$table->json('cycle_rule')->nullable()->comment('任务周期规则');
|
||||
$table->longText('rule')->nullable()->comment('任务表达式');
|
||||
$table->longText('target')->nullable()->comment('调用任务字符串');
|
||||
$table->integer('running_times')->default(0)->comment('已运行次数');
|
||||
$table->integer('last_running_time')->default(0)->comment('上次运行时间');
|
||||
$table->tinyInteger('first_started')->default(0)->comment('是否已首次启动: 0未启动, 1已启动');
|
||||
$table->tinyInteger('enabled')->default(0)->comment('任务状态: 0禁用, 1启用');
|
||||
$table->integer('created_at')->default(0)->comment('创建时间');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建人');
|
||||
$table->bigInteger('deleted_at')->default(0)->comment('软删除时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('更新时间');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新人');
|
||||
$table->tinyInteger('singleton')->default(1)->comment('是否循环执行');
|
||||
$table->longText('remark')->nullable()->comment('备注');
|
||||
$table->index('title');
|
||||
$table->index('enabled');
|
||||
$table->index('first_started');
|
||||
});
|
||||
}
|
||||
|
||||
// 定时任务日志表
|
||||
if (!$schema->hasTable('sys_crontab_log')) {
|
||||
$schema->create('sys_crontab_log', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->bigInteger('crontab_id')->comment('任务id');
|
||||
$table->string('target', 255)->nullable()->comment('任务调用目标字符串');
|
||||
$table->longText('log')->nullable()->comment('任务执行日志');
|
||||
$table->tinyInteger('return_code')->default(1)->comment('执行返回状态: 1成功, 0失败');
|
||||
$table->string('running_time', 10)->comment('执行所用时间');
|
||||
$table->bigInteger('created_at')->default(0)->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('更新时间');
|
||||
$table->index('created_at');
|
||||
$table->index('crontab_id');
|
||||
});
|
||||
}
|
||||
|
||||
// 部门信息表
|
||||
if (!$schema->hasTable('sys_dept')) {
|
||||
$schema->create('sys_dept', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->bigInteger('pid')->nullable()->comment('父ID');
|
||||
$table->string('level', 500)->nullable()->comment('组级集合');
|
||||
$table->string('code', 50)->nullable()->comment('部门唯一编码');
|
||||
$table->string('name', 30)->nullable()->comment('部门名称');
|
||||
$table->string('main_leader_id', 20)->nullable()->comment('负责人');
|
||||
$table->string('phone', 11)->nullable()->comment('联系电话');
|
||||
$table->smallInteger('enabled')->default(1)->comment('状态: 1正常 0停用');
|
||||
$table->smallInteger('sort')->default(0)->comment('排序');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建者');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新者');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
$table->longText('remark')->nullable()->comment('备注');
|
||||
$table->index('pid');
|
||||
});
|
||||
}
|
||||
|
||||
// 部门领导关联表
|
||||
if (!$schema->hasTable('sys_dept_leader')) {
|
||||
$schema->create('sys_dept_leader', function (Blueprint $table) {
|
||||
$table->bigInteger('dept_id')->comment('部门主键');
|
||||
$table->bigInteger('admin_id')->comment('管理员主键');
|
||||
$table->primary(['dept_id', 'admin_id']);
|
||||
});
|
||||
}
|
||||
|
||||
// 字典类型表
|
||||
if (!$schema->hasTable('sys_dict')) {
|
||||
$schema->create('sys_dict', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('group_code', 50)->nullable()->comment('字典类型');
|
||||
$table->string('name', 50)->nullable()->comment('字典名称');
|
||||
$table->string('code', 100)->nullable()->comment('字典标示');
|
||||
$table->bigInteger('sort')->default(0)->comment('排序');
|
||||
$table->smallInteger('data_type')->default(1)->comment('数据类型');
|
||||
$table->longText('description')->nullable()->comment('描述');
|
||||
$table->smallInteger('enabled')->default(1)->comment('状态: 1正常 0停用');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建者');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新者');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
});
|
||||
}
|
||||
|
||||
// 字典数据表
|
||||
if (!$schema->hasTable('sys_dict_item')) {
|
||||
$schema->create('sys_dict_item', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->bigInteger('dict_id')->nullable()->comment('字典类型ID');
|
||||
$table->string('label', 50)->nullable()->comment('字典标签');
|
||||
$table->string('value', 100)->nullable()->comment('字典值');
|
||||
$table->string('code', 100)->nullable()->comment('字典标示');
|
||||
$table->string('color', 50)->nullable()->comment('tag颜色');
|
||||
$table->string('other_class', 50)->nullable();
|
||||
$table->smallInteger('sort')->default(0)->comment('排序');
|
||||
$table->smallInteger('enabled')->default(1)->comment('状态: 1正常 0停用');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建者');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新者');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
$table->longText('remark')->nullable()->comment('备注');
|
||||
$table->index('dict_id');
|
||||
});
|
||||
}
|
||||
|
||||
// 登录日志表
|
||||
if (!$schema->hasTable('sys_login_log')) {
|
||||
$schema->create('sys_login_log', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->bigInteger('user_id')->nullable()->comment('关联Admin ID');
|
||||
$table->string('ip', 45)->nullable()->comment('登录IP地址');
|
||||
$table->string('ip_location', 255)->nullable()->comment('IP所属地');
|
||||
$table->string('os', 50)->nullable()->comment('操作系统');
|
||||
$table->string('browser', 50)->nullable()->comment('浏览器');
|
||||
$table->smallInteger('status')->default(1)->comment('登录状态: 1成功 2失败');
|
||||
$table->longText('message')->nullable()->comment('提示消息');
|
||||
$table->bigInteger('login_time')->nullable()->comment('登录时间');
|
||||
$table->longText('key')->nullable()->comment('key');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('expires_at')->nullable()->comment('过期时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('更新时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
$table->string('remark', 255)->nullable()->comment('备注');
|
||||
$table->index('user_id');
|
||||
});
|
||||
}
|
||||
|
||||
// 菜单表
|
||||
if (!$schema->hasTable('sys_menu')) {
|
||||
$schema->create('sys_menu', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('菜单ID');
|
||||
$table->bigInteger('pid')->default(0)->comment('父ID');
|
||||
$table->string('app', 32)->default('admin')->comment('应用编码');
|
||||
$table->string('source', 50)->default('system')->comment('菜单来源');
|
||||
$table->string('title', 64)->comment('菜单名称');
|
||||
$table->string('code', 64)->nullable()->comment('唯一编码');
|
||||
$table->string('level', 255)->nullable()->comment('父ID集合');
|
||||
$table->integer('type')->nullable()->comment('菜单类型: 1目录 2菜单 3按钮 4接口 5内链 6外链');
|
||||
$table->bigInteger('sort')->default(999)->comment('排序');
|
||||
$table->string('path', 100)->nullable()->comment('路由地址');
|
||||
$table->string('component', 100)->nullable()->comment('组件地址');
|
||||
$table->string('redirect', 255)->nullable()->comment('重定向');
|
||||
$table->string('icon', 64)->nullable()->comment('菜单图标');
|
||||
$table->tinyInteger('is_show')->default(1)->comment('是否显示: 0否 1是');
|
||||
$table->tinyInteger('is_link')->default(0)->comment('是否外链: 0否 1是');
|
||||
$table->longText('link_url')->nullable()->comment('外部链接地址');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 1正常 0停用');
|
||||
$table->integer('open_type')->default(0)->comment('是否外链: 1是 0否');
|
||||
$table->tinyInteger('is_cache')->default(0)->comment('是否缓存: 1是 0否');
|
||||
$table->tinyInteger('is_sync')->default(1)->comment('是否同步');
|
||||
$table->tinyInteger('is_affix')->default(0)->comment('是否固定tags无法关闭');
|
||||
$table->tinyInteger('is_global')->default(0)->comment('是否全局公共菜单');
|
||||
$table->string('variable', 500)->nullable()->comment('额外参数JSON');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建用户');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('更新时间');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新用户');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
$table->string('methods', 10)->default('get')->comment('请求方法');
|
||||
$table->tinyInteger('is_frame')->nullable()->comment('是否外链');
|
||||
$table->index('code');
|
||||
$table->index('app');
|
||||
});
|
||||
}
|
||||
|
||||
// 系统消息表
|
||||
if (!$schema->hasTable('sys_message')) {
|
||||
$schema->create('sys_message', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('type', 50)->nullable()->comment('消息类型');
|
||||
$table->string('title', 255)->default('')->comment('消息标题');
|
||||
$table->longText('content')->nullable()->comment('消息内容');
|
||||
$table->bigInteger('sender_id')->default(0)->comment('发送者ID');
|
||||
$table->bigInteger('receiver_id')->comment('接收者ID');
|
||||
$table->string('message_uuid', 50)->nullable()->comment('消息唯一编码');
|
||||
$table->enum('status', ['unread', 'read'])->default('unread')->comment('消息状态');
|
||||
$table->tinyInteger('priority')->default(3)->comment('优先级: 1紧急 2急迫 3普通');
|
||||
$table->string('channel', 50)->default('message')->comment('发送渠道');
|
||||
$table->string('related_id', 100)->default('')->comment('关联业务ID');
|
||||
$table->string('related_type', 100)->default('')->comment('关联业务类型');
|
||||
$table->json('jump_params')->nullable()->comment('调整参数');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('expired_at')->nullable()->comment('过期时间');
|
||||
$table->bigInteger('read_at')->nullable()->comment('已读时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('更新时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
});
|
||||
}
|
||||
|
||||
// 通知公告表
|
||||
if (!$schema->hasTable('sys_notice')) {
|
||||
$schema->create('sys_notice', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('公告ID');
|
||||
$table->enum('type', ['announcement', 'notice'])->default('announcement')->comment('公告类型');
|
||||
$table->string('title', 50)->comment('公告标题');
|
||||
$table->longText('content')->nullable()->comment('公告内容');
|
||||
$table->integer('sort')->default(10)->comment('排序');
|
||||
$table->tinyInteger('enabled')->default(0)->comment('公告状态: 0正常 1关闭');
|
||||
$table->string('uuid', 50)->nullable()->comment('uuid');
|
||||
$table->bigInteger('created_dept')->nullable()->comment('创建部门');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建者');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新者');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('更新时间');
|
||||
$table->string('remark', 255)->nullable()->comment('备注');
|
||||
});
|
||||
}
|
||||
|
||||
// 系统操作日志表
|
||||
if (!$schema->hasTable('sys_operate_log')) {
|
||||
$schema->create('sys_operate_log', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('name', 50)->nullable()->comment('内容');
|
||||
$table->string('app', 50)->nullable()->comment('应用名称');
|
||||
$table->string('ip', 255)->nullable()->comment('请求ip');
|
||||
$table->string('ip_location', 255)->nullable()->comment('请求ip归属地');
|
||||
$table->string('browser', 255)->nullable()->comment('浏览器');
|
||||
$table->string('os', 255)->nullable()->comment('操作系统');
|
||||
$table->string('url', 500)->nullable()->comment('请求地址');
|
||||
$table->string('class_name', 500)->nullable()->comment('类名称');
|
||||
$table->string('action', 500)->nullable()->comment('方法名称');
|
||||
$table->string('method', 255)->nullable()->comment('请求方式');
|
||||
$table->longText('param')->nullable()->comment('请求参数');
|
||||
$table->longText('result')->nullable()->comment('返回结果');
|
||||
$table->bigInteger('created_at')->nullable()->comment('操作时间');
|
||||
$table->bigInteger('updated_at')->nullable();
|
||||
$table->string('user_name', 50)->nullable()->comment('操作账号');
|
||||
});
|
||||
}
|
||||
|
||||
// 岗位信息表
|
||||
if (!$schema->hasTable('sys_post')) {
|
||||
$schema->create('sys_post', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->bigInteger('dept_id')->nullable()->comment('部门id');
|
||||
$table->string('code', 100)->comment('岗位代码');
|
||||
$table->string('name', 50)->comment('岗位名称');
|
||||
$table->smallInteger('sort')->default(0)->comment('排序');
|
||||
$table->smallInteger('enabled')->default(1)->comment('状态: 1正常 0停用');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建者');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新者');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
$table->string('remark', 255)->nullable()->comment('备注');
|
||||
});
|
||||
}
|
||||
|
||||
// 限流规则表
|
||||
if (!$schema->hasTable('sys_rate_limiter')) {
|
||||
$schema->create('sys_rate_limiter', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('name', 64)->comment('规则名称');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态');
|
||||
$table->integer('priority')->default(100)->comment('优先级');
|
||||
$table->enum('match_type', ['exact', 'wildcard', 'regex'])->default('exact')->comment('匹配类型');
|
||||
$table->string('ip', 50)->nullable()->comment('ip地址');
|
||||
$table->string('methods', 100)->default('GET')->comment('请求方法');
|
||||
$table->string('path', 255)->default('/')->comment('请求路径');
|
||||
$table->string('limit_type', 50)->default('ip')->comment('限制类型');
|
||||
$table->integer('limit_value')->default(0)->comment('限制值');
|
||||
$table->integer('period')->default(60)->comment('统计周期(秒)');
|
||||
$table->integer('ttl')->nullable()->comment('缓存时间(秒)');
|
||||
$table->longText('message')->nullable()->comment('提示信息');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建人');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('修改人');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->index(['enabled', 'priority']);
|
||||
$table->index(['methods', 'path']);
|
||||
});
|
||||
}
|
||||
|
||||
// 限制访问名单表
|
||||
if (!$schema->hasTable('sys_rate_restrictions')) {
|
||||
$schema->create('sys_rate_restrictions', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('ip', 50)->nullable()->comment('IP地址');
|
||||
$table->string('name', 64)->comment('名称');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('规则状态: 0禁用 1启用');
|
||||
$table->integer('priority')->default(100)->comment('规则优先级');
|
||||
$table->string('methods', 100)->default('GET')->comment('请求方法');
|
||||
$table->string('path', 255)->default('/')->comment('路径');
|
||||
$table->string('message', 255)->nullable()->comment('提示信息');
|
||||
$table->bigInteger('start_time')->nullable()->comment('开始时间');
|
||||
$table->bigInteger('end_time')->nullable()->comment('结束时间');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建人');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('修改人');
|
||||
$table->longText('remark')->nullable()->comment('备注');
|
||||
$table->index(['enabled', 'priority']);
|
||||
$table->index(['ip', 'methods', 'path']);
|
||||
});
|
||||
}
|
||||
|
||||
// 数据回收记录表
|
||||
if (!$schema->hasTable('sys_recycle_bin')) {
|
||||
$schema->create('sys_recycle_bin', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('ID');
|
||||
$table->bigInteger('original_id')->nullable()->comment('原始数据ID');
|
||||
$table->json('data')->nullable()->comment('回收的数据');
|
||||
$table->string('table_name', 100)->default('')->comment('数据表');
|
||||
$table->string('table_prefix', 50)->nullable()->comment('表前缀');
|
||||
$table->tinyInteger('enabled')->default(0)->comment('是否已还原');
|
||||
$table->string('ip', 50)->default('')->comment('操作者IP');
|
||||
$table->bigInteger('operate_by')->default(0)->comment('操作管理员');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('更新时间');
|
||||
});
|
||||
}
|
||||
|
||||
// 审核记录表
|
||||
if (!$schema->hasTable('sys_review')) {
|
||||
$schema->create('sys_review', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('雪花ID主键');
|
||||
$table->string('reviewable_type', 255)->comment('关联模型类型');
|
||||
$table->bigInteger('reviewable_id')->comment('关联模型ID');
|
||||
$table->tinyInteger('status')->default(0)->comment('审核状态: 0待审/1通过/2拒绝');
|
||||
$table->longText('reason')->nullable()->comment('审核原因/备注');
|
||||
$table->bigInteger('reviewer_id')->nullable()->comment('审核人ID');
|
||||
$table->integer('reviewed_at')->nullable()->comment('审核时间戳');
|
||||
$table->string('flow_instance_id', 100)->nullable()->comment('审批流实例ID');
|
||||
$table->json('extra_data')->nullable()->comment('扩展数据');
|
||||
$table->bigInteger('created_by')->comment('创建人ID');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新人ID');
|
||||
$table->integer('created_at')->comment('创建时间戳');
|
||||
$table->integer('updated_at')->comment('更新时间戳');
|
||||
$table->integer('deleted_at')->nullable()->comment('软删除时间戳');
|
||||
$table->index(['reviewable_type', 'reviewable_id']);
|
||||
$table->index('status');
|
||||
$table->index('reviewer_id');
|
||||
$table->index('flow_instance_id');
|
||||
$table->index('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
// 角色信息表
|
||||
if (!$schema->hasTable('sys_role')) {
|
||||
$schema->create('sys_role', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->bigInteger('pid')->default(0)->comment('父级id');
|
||||
$table->string('name', 30)->nullable()->comment('角色名称');
|
||||
$table->string('code', 100)->nullable()->comment('角色代码');
|
||||
$table->tinyInteger('is_super_admin')->default(0)->comment('是否超级管理员: 1是 0否');
|
||||
$table->tinyInteger('role_type')->nullable()->comment('角色类型');
|
||||
$table->smallInteger('data_scope')->default(1)->comment('数据范围');
|
||||
$table->smallInteger('enabled')->default(1)->comment('状态: 1正常 0停用');
|
||||
$table->smallInteger('sort')->default(0)->comment('排序');
|
||||
$table->string('remark', 255)->nullable()->comment('备注');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建者');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新者');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
});
|
||||
}
|
||||
|
||||
// 角色与部门关联表
|
||||
if (!$schema->hasTable('sys_role_dept')) {
|
||||
$schema->create('sys_role_dept', function (Blueprint $table) {
|
||||
$table->bigInteger('role_id')->comment('用户主键');
|
||||
$table->bigInteger('dept_id')->comment('角色主键');
|
||||
$table->primary(['role_id', 'dept_id']);
|
||||
});
|
||||
}
|
||||
|
||||
// 角色与菜单关联表
|
||||
if (!$schema->hasTable('sys_role_menu')) {
|
||||
$schema->create('sys_role_menu', function (Blueprint $table) {
|
||||
$table->bigInteger('role_id')->comment('角色主键');
|
||||
$table->bigInteger('menu_id')->comment('菜单主键');
|
||||
$table->primary(['role_id', 'menu_id']);
|
||||
});
|
||||
}
|
||||
|
||||
// 角色与部门关联表
|
||||
if (!$schema->hasTable('sys_role_scope_dept')) {
|
||||
$schema->create('sys_role_scope_dept', function (Blueprint $table) {
|
||||
$table->bigInteger('role_id')->comment('用户主键');
|
||||
$table->bigInteger('dept_id')->comment('角色主键');
|
||||
$table->primary(['role_id', 'dept_id']);
|
||||
});
|
||||
}
|
||||
|
||||
// 文件信息表
|
||||
if (!$schema->hasTable('sys_upload')) {
|
||||
$schema->create('sys_upload', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('文件信息ID');
|
||||
$table->longText('url')->comment('文件访问地址');
|
||||
$table->bigInteger('size')->nullable()->comment('文件大小');
|
||||
$table->string('size_info', 64)->nullable()->comment('文件大小有单位');
|
||||
$table->string('hash', 64)->nullable()->comment('文件hash');
|
||||
$table->string('filename', 255)->nullable()->comment('文件名称');
|
||||
$table->string('original_filename', 255)->nullable()->comment('原始文件名');
|
||||
$table->longText('base_path')->nullable()->comment('基础存储路径');
|
||||
$table->longText('path')->nullable()->comment('存储路径');
|
||||
$table->string('ext', 32)->nullable()->comment('文件扩展名');
|
||||
$table->string('content_type', 100)->nullable()->comment('MIME类型');
|
||||
$table->string('platform', 32)->nullable()->comment('存储平台');
|
||||
$table->string('th_url', 255)->nullable()->comment('缩略图访问路径');
|
||||
$table->string('th_filename', 255)->nullable()->comment('缩略图文件名');
|
||||
$table->bigInteger('th_size')->nullable()->comment('缩略图大小');
|
||||
$table->string('th_size_info', 64)->nullable()->comment('缩略图大小有单位');
|
||||
$table->string('th_content_type', 32)->nullable()->comment('缩略图MIME类型');
|
||||
$table->string('object_id', 32)->nullable()->comment('文件所属对象id');
|
||||
$table->string('object_type', 32)->nullable()->comment('文件所属对象类型');
|
||||
$table->text('attr')->nullable()->comment('附加属性');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('更新时间');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建用户');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新用户');
|
||||
});
|
||||
}
|
||||
|
||||
echo "Created sys tables.\n";
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
$schema->dropIfExists('sys_upload');
|
||||
$schema->dropIfExists('sys_role_scope_dept');
|
||||
$schema->dropIfExists('sys_role_menu');
|
||||
$schema->dropIfExists('sys_role_dept');
|
||||
$schema->dropIfExists('sys_role');
|
||||
$schema->dropIfExists('sys_review');
|
||||
$schema->dropIfExists('sys_recycle_bin');
|
||||
$schema->dropIfExists('sys_rate_restrictions');
|
||||
$schema->dropIfExists('sys_rate_limiter');
|
||||
$schema->dropIfExists('sys_post');
|
||||
$schema->dropIfExists('sys_operate_log');
|
||||
$schema->dropIfExists('sys_notice');
|
||||
$schema->dropIfExists('sys_message');
|
||||
$schema->dropIfExists('sys_menu');
|
||||
$schema->dropIfExists('sys_login_log');
|
||||
$schema->dropIfExists('sys_dict_item');
|
||||
$schema->dropIfExists('sys_dict');
|
||||
$schema->dropIfExists('sys_dept_leader');
|
||||
$schema->dropIfExists('sys_dept');
|
||||
$schema->dropIfExists('sys_crontab_log');
|
||||
$schema->dropIfExists('sys_crontab');
|
||||
$schema->dropIfExists('sys_config');
|
||||
$schema->dropIfExists('sys_admin_role');
|
||||
$schema->dropIfExists('sys_admin_post');
|
||||
$schema->dropIfExists('sys_admin_dept');
|
||||
$schema->dropIfExists('sys_admin_main');
|
||||
$schema->dropIfExists('sys_admin');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 创建Web相关表
|
||||
* 表:
|
||||
* - web_menu (Web菜单表)
|
||||
* - web_link (友情链接表)
|
||||
* - web_adv (广告表)
|
||||
*/
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
// 1. Web菜单表
|
||||
if (!$schema->hasTable('web_menu')) {
|
||||
$schema->create('web_menu', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->bigInteger('pid')->default(0)->comment('父ID');
|
||||
$table->string('app', 32)->default('web')->comment('应用编码');
|
||||
$table->string('category', 32)->default('1')->comment('菜单分类');
|
||||
$table->string('source', 50)->default('system')->comment('菜单来源');
|
||||
$table->string('code', 64)->nullable()->comment('唯一编码');
|
||||
$table->string('name', 64)->comment('菜单名称');
|
||||
$table->string('url', 255)->nullable()->comment('链接地址');
|
||||
$table->string('icon', 64)->nullable()->comment('菜单图标');
|
||||
$table->integer('level')->default(1)->comment('菜单级别');
|
||||
$table->integer('type')->default(1)->comment('菜单类型: 1目录 2菜单 3按钮 4接口 5内链 6外链');
|
||||
$table->bigInteger('sort')->default(999)->comment('排序');
|
||||
$table->integer('target')->default(1)->comment('打开方式: 1当前窗口 2新窗口');
|
||||
$table->json('extra')->nullable()->comment('扩展数据:JSON格式任意配置');
|
||||
$table->tinyInteger('is_show')->default(1)->comment('是否显示: 0否 1是');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 1正常 0停用');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
$table->index('code');
|
||||
$table->index('app');
|
||||
});
|
||||
}
|
||||
|
||||
// 2. 友情链接表
|
||||
if (!$schema->hasTable('web_link')) {
|
||||
$schema->create('web_link', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('name', 64)->comment('链接名称');
|
||||
$table->string('url', 255)->comment('链接地址');
|
||||
$table->string('logo', 255)->nullable()->comment('链接 logo');
|
||||
$table->string('description', 255)->nullable()->comment('链接描述');
|
||||
$table->string('category', 32)->default('footer')->comment('链接分类');
|
||||
$table->string('target', 10)->default('_blank')->comment('打开方式');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 1正常 0停用');
|
||||
$table->smallInteger('sort')->default(0)->comment('排序');
|
||||
$table->integer('click_count')->default(0)->comment('点击次数');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
});
|
||||
}
|
||||
|
||||
// 3. 广告表
|
||||
if (!$schema->hasTable('web_adv')) {
|
||||
$schema->create('web_adv', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('title', 64)->comment('广告标题');
|
||||
$table->string('link', 255)->nullable()->comment('链接地址');
|
||||
$table->string('image', 255)->comment('广告图片');
|
||||
$table->string('description', 500)->nullable()->comment('广告描述');
|
||||
$table->integer('sort')->default(0)->comment('排序');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 1正常 0停用');
|
||||
$table->bigInteger('start_time')->nullable()->comment('开始时间');
|
||||
$table->bigInteger('end_time')->nullable()->comment('结束时间');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
});
|
||||
}
|
||||
|
||||
echo "Created web tables.\n";
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
$schema->dropIfExists('web_adv');
|
||||
$schema->dropIfExists('web_link');
|
||||
$schema->dropIfExists('web_menu');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 创建插件相关表
|
||||
*
|
||||
* 表:
|
||||
* - plugin (插件表)
|
||||
* - plugin_log (插件日志表)
|
||||
*/
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
// 1. 插件表
|
||||
if (!$schema->hasTable('plugin')) {
|
||||
$schema->create('plugin', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('title', 128)->comment('插件标题');
|
||||
$table->longText('icon')->nullable()->comment('插件图标');
|
||||
$table->string('key', 64)->unique()->comment('插件标识');
|
||||
$table->string('desc', 255)->nullable()->comment('插件描述');
|
||||
$table->tinyInteger('status')->default(1)->comment('状态: 1启用 0禁用');
|
||||
$table->string('author', 64)->nullable()->comment('作者');
|
||||
$table->string('version', 20)->comment('插件版本');
|
||||
$table->string('type', 32)->default('custom')->comment('插件类型');
|
||||
$table->longText('cover')->nullable()->comment('插件封面');
|
||||
$table->longText('variables')->nullable()->comment('插件变量配置');
|
||||
$table->string('support_app', 32)->default('admin')->comment('支持的终端');
|
||||
$table->bigInteger('installed_at')->nullable()->comment('安装时间');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->index('key');
|
||||
});
|
||||
}
|
||||
|
||||
// 2. 插件日志表
|
||||
if (!$schema->hasTable('plugin_log')) {
|
||||
$schema->create('plugin_log', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('action', 32)->comment('操作类型');
|
||||
$table->string('key', 64)->comment('插件标识');
|
||||
$table->string('pre_upgrade_version', 20)->nullable()->comment('升级前版本');
|
||||
$table->string('post_upgrade_version', 20)->nullable()->comment('升级后版本');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->index('key');
|
||||
$table->index('action');
|
||||
});
|
||||
}
|
||||
|
||||
echo "Created plugin tables.\n";
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
$schema->dropIfExists('plugin_log');
|
||||
$schema->dropIfExists('plugin');
|
||||
}
|
||||
};
|
||||
+295
@@ -0,0 +1,295 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 创建会员表
|
||||
*
|
||||
* 表:
|
||||
* - member (会员表)
|
||||
* - member_bill (会员账单表)
|
||||
* - member_level (会员等级表)
|
||||
* - member_menu (会员菜单表)
|
||||
* - member_points (会员积分表)
|
||||
* - member_sign (会员签到表)
|
||||
* - member_tag (会员标签表)
|
||||
* - member_tag_permission (标签权限关系表)
|
||||
* - member_tag_relation (会员标签关系表)
|
||||
* - member_third_party (会员第三方登录表)
|
||||
* - member_withdraw (会员提现表)
|
||||
* - member_withdraw_account (会员提现账号表)
|
||||
*/
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
// 1. 会员表
|
||||
if (!$schema->hasTable('member')) {
|
||||
$schema->create('member', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('雪花ID');
|
||||
$table->string('username', 50)->unique()->comment('用户名');
|
||||
$table->string('email', 100)->nullable()->comment('邮箱');
|
||||
$table->string('phone', 20)->nullable()->comment('手机号');
|
||||
$table->string('password', 255)->comment('密码');
|
||||
$table->string('nickname', 50)->nullable()->comment('昵称');
|
||||
$table->string('avatar', 255)->nullable()->comment('头像');
|
||||
$table->bigInteger('level_id')->default(1)->comment('等级ID');
|
||||
$table->integer('points')->default(0)->comment('积分');
|
||||
$table->decimal('balance', 10, 2)->default(0)->comment('余额');
|
||||
$table->tinyInteger('gender')->default(0)->comment('性别: 0-未知 1-男 2-女');
|
||||
$table->integer('birthday')->nullable()->comment('生日时间戳');
|
||||
$table->integer('last_login_time')->nullable()->comment('最后登录时间戳');
|
||||
$table->string('last_login_ip', 50)->nullable()->comment('最后登录IP');
|
||||
$table->integer('login_count')->default(0)->comment('登录次数');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 1-启用 0-禁用');
|
||||
$table->integer('created_at')->nullable()->comment('创建时间戳');
|
||||
$table->integer('updated_at')->nullable()->comment('更新时间戳');
|
||||
$table->integer('deleted_at')->nullable()->comment('删除时间戳');
|
||||
$table->longText('bio')->nullable()->comment('个人简介');
|
||||
$table->index('level_id');
|
||||
$table->index('enabled');
|
||||
$table->index('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
// 2. 会员账单表
|
||||
if (!$schema->hasTable('member_bill')) {
|
||||
$schema->create('member_bill', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('雪花ID');
|
||||
$table->bigInteger('member_id')->comment('会员ID');
|
||||
$table->tinyInteger('type')->comment('类型: 1-收入 2-支出');
|
||||
$table->tinyInteger('category')->comment('分类: 1-充值 2-提现 3-订单 4-退款 5-积分 6-签到 99-其他');
|
||||
$table->decimal('amount', 10, 2)->comment('金额');
|
||||
$table->decimal('balance', 10, 2)->nullable()->comment('余额');
|
||||
$table->string('description', 255)->nullable()->comment('描述');
|
||||
$table->string('order_sn', 50)->nullable()->comment('订单号');
|
||||
$table->tinyInteger('status')->default(0)->comment('状态: 0-待处理 1-成功 2-失败');
|
||||
$table->integer('created_at')->nullable()->comment('创建时间戳');
|
||||
$table->integer('updated_at')->nullable()->comment('更新时间戳');
|
||||
$table->index('member_id');
|
||||
$table->index('type');
|
||||
$table->index('category');
|
||||
$table->index('status');
|
||||
$table->index('created_at');
|
||||
$table->index('order_sn');
|
||||
});
|
||||
}
|
||||
|
||||
// 3. 会员等级表
|
||||
if (!$schema->hasTable('member_level')) {
|
||||
$schema->create('member_level', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('雪花ID');
|
||||
$table->string('name', 50)->unique()->comment('等级名称');
|
||||
$table->tinyInteger('level')->comment('等级值');
|
||||
$table->integer('min_points')->default(0)->comment('最低积分');
|
||||
$table->integer('max_points')->default(0)->comment('最高积分');
|
||||
$table->decimal('discount', 3, 2)->default(1.00)->comment('折扣率');
|
||||
$table->string('icon', 255)->nullable()->comment('等级图标');
|
||||
$table->string('color', 20)->nullable()->comment('等级颜色');
|
||||
$table->string('description', 255)->nullable()->comment('等级描述');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 1-启用 0-禁用');
|
||||
$table->integer('created_at')->nullable()->comment('创建时间戳');
|
||||
$table->integer('updated_at')->nullable()->comment('更新时间戳');
|
||||
$table->index('level');
|
||||
$table->index('enabled');
|
||||
});
|
||||
}
|
||||
|
||||
// 4. 会员菜单表
|
||||
if (!$schema->hasTable('member_menu')) {
|
||||
$schema->create('member_menu', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('雪花ID');
|
||||
$table->string('name', 100)->comment('菜单名称');
|
||||
$table->string('url', 255)->comment('菜单链接');
|
||||
$table->string('icon', 100)->nullable()->comment('菜单图标');
|
||||
$table->bigInteger('parent_id')->default(0)->comment('父级ID');
|
||||
$table->tinyInteger('level')->default(1)->comment('级别');
|
||||
$table->tinyInteger('type')->default(1)->comment('菜单类型: 1-普通菜单 2-开通菜单');
|
||||
$table->smallInteger('sort')->default(0)->comment('排序');
|
||||
$table->tinyInteger('target')->default(2)->comment('目标窗口: 1-当前窗口 2-新窗口');
|
||||
$table->decimal('price', 10, 2)->default(0)->comment('开通价格');
|
||||
$table->tinyInteger('is_open')->default(0)->comment('是否开通: 1-已开通 0-未开通');
|
||||
$table->string('open_condition', 255)->nullable()->comment('开通条件');
|
||||
$table->tinyInteger('is_show')->default(1)->comment('显示状态: 1-显示 0-隐藏');
|
||||
$table->tinyInteger('status')->default(1)->comment('状态: 1-启用 0-禁用');
|
||||
$table->integer('created_at')->nullable()->comment('创建时间戳');
|
||||
$table->integer('updated_at')->nullable()->comment('更新时间戳');
|
||||
$table->integer('deleted_at')->nullable()->comment('删除时间戳');
|
||||
$table->index('parent_id');
|
||||
$table->index('type');
|
||||
$table->index('sort');
|
||||
$table->index('is_open');
|
||||
$table->index('is_show');
|
||||
$table->index('status');
|
||||
});
|
||||
}
|
||||
|
||||
// 5. 会员积分表
|
||||
if (!$schema->hasTable('member_points')) {
|
||||
$schema->create('member_points', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键ID');
|
||||
$table->bigInteger('member_id')->comment('会员ID');
|
||||
$table->integer('points')->default(0)->comment('积分数量');
|
||||
$table->integer('balance')->nullable()->comment('操作后积分');
|
||||
$table->tinyInteger('type')->nullable()->comment('积分类型: 1-增加 2-减少 3-调整');
|
||||
$table->string('source', 255)->nullable()->comment('积分来源');
|
||||
$table->string('remark', 255)->nullable()->comment('备注');
|
||||
$table->string('operator', 50)->nullable()->comment('操作人');
|
||||
$table->string('order_id', 50)->nullable()->comment('订单ID');
|
||||
$table->integer('created_at')->nullable()->comment('创建时间');
|
||||
$table->integer('updated_at')->nullable()->comment('创建时间');
|
||||
$table->index('member_id');
|
||||
$table->index('type');
|
||||
$table->index('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
// 6. 会员签到表
|
||||
if (!$schema->hasTable('member_sign')) {
|
||||
$schema->create('member_sign', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('雪花ID');
|
||||
$table->bigInteger('member_id')->comment('会员ID');
|
||||
$table->date('sign_date')->nullable()->comment('签到日期');
|
||||
$table->integer('points')->default(0)->comment('签到积分');
|
||||
$table->smallInteger('continuous_days')->default(1)->comment('连续签到天数');
|
||||
$table->integer('created_at')->nullable()->comment('创建时间戳');
|
||||
$table->integer('updated_at')->nullable();
|
||||
$table->string('device_ip', 50)->nullable();
|
||||
$table->string('device_ua', 50)->nullable();
|
||||
$table->unique(['member_id', 'sign_date']);
|
||||
$table->index('member_id');
|
||||
$table->index('sign_date');
|
||||
});
|
||||
}
|
||||
|
||||
// 7. 会员标签表
|
||||
if (!$schema->hasTable('member_tag')) {
|
||||
$schema->create('member_tag', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('雪花ID');
|
||||
$table->string('name', 50)->unique()->comment('标签名称');
|
||||
$table->string('color', 20)->nullable()->comment('标签颜色');
|
||||
$table->string('description', 255)->nullable()->comment('标签描述');
|
||||
$table->smallInteger('sort')->default(0)->comment('排序');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 1-启用 0-禁用');
|
||||
$table->integer('created_at')->nullable()->comment('创建时间戳');
|
||||
$table->integer('updated_at')->nullable()->comment('更新时间戳');
|
||||
$table->index('sort');
|
||||
$table->index('enabled');
|
||||
});
|
||||
}
|
||||
|
||||
// 8. 标签权限关系表
|
||||
if (!$schema->hasTable('member_tag_permission')) {
|
||||
$schema->create('member_tag_permission', function (Blueprint $table) {
|
||||
$table->bigInteger('menu_id')->comment('WEB_MENU_ID');
|
||||
$table->bigInteger('tag_id')->comment('标签ID');
|
||||
$table->primary(['menu_id', 'tag_id']);
|
||||
$table->index('menu_id');
|
||||
$table->index('tag_id');
|
||||
});
|
||||
}
|
||||
|
||||
// 9. 会员标签关系表
|
||||
if (!$schema->hasTable('member_tag_relation')) {
|
||||
$schema->create('member_tag_relation', function (Blueprint $table) {
|
||||
$table->bigInteger('member_id')->comment('会员ID');
|
||||
$table->bigInteger('tag_id')->comment('标签ID');
|
||||
$table->unique(['member_id', 'tag_id']);
|
||||
$table->index('member_id');
|
||||
$table->index('tag_id');
|
||||
});
|
||||
}
|
||||
|
||||
// 10. 会员第三方登录表
|
||||
if (!$schema->hasTable('member_third_party')) {
|
||||
$schema->create('member_third_party', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键ID');
|
||||
$table->bigInteger('member_id')->comment('会员ID');
|
||||
$table->tinyInteger('platform')->default(0)->comment('平台类型: 1=QQ, 2=微信, 3=微博, 4=抖音');
|
||||
$table->string('openid', 255)->default('')->comment('第三方OpenID');
|
||||
$table->string('unionid', 255)->default('')->comment('第三方UnionID');
|
||||
$table->string('nickname', 50)->default('')->comment('昵称');
|
||||
$table->string('avatar', 255)->default('')->comment('头像');
|
||||
$table->tinyInteger('gender')->default(0)->comment('性别: 0=未知, 1=男, 2=女');
|
||||
$table->string('country', 50)->default('')->comment('国家');
|
||||
$table->string('province', 50)->default('')->comment('省份');
|
||||
$table->string('city', 50)->default('')->comment('城市');
|
||||
$table->string('access_token', 255)->default('')->comment('访问令牌');
|
||||
$table->string('refresh_token', 255)->default('')->comment('刷新令牌');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 0=禁用, 1=启用');
|
||||
$table->integer('expires_at')->nullable()->comment('令牌过期时间');
|
||||
$table->integer('created_at')->nullable()->comment('创建时间');
|
||||
$table->integer('updated_at')->nullable()->comment('更新时间');
|
||||
});
|
||||
}
|
||||
|
||||
// 11. 会员提现表
|
||||
if (!$schema->hasTable('member_withdraw')) {
|
||||
$schema->create('member_withdraw', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('雪花ID');
|
||||
$table->bigInteger('member_id')->comment('会员ID');
|
||||
$table->bigInteger('account_id')->nullable()->comment('提现账号ID');
|
||||
$table->decimal('amount', 10, 2)->comment('提现金额');
|
||||
$table->decimal('fee', 10, 2)->default(0)->comment('手续费');
|
||||
$table->decimal('actual_amount', 10, 2)->default(0)->comment('实际到账金额');
|
||||
$table->tinyInteger('status')->nullable()->comment('状态');
|
||||
$table->string('bank_name', 100)->nullable()->comment('银行名称');
|
||||
$table->string('bank_account', 50)->nullable()->comment('银行账号');
|
||||
$table->string('bank_cardholder', 50)->nullable()->comment('持卡人姓名');
|
||||
$table->string('order_sn', 50)->nullable()->comment('订单号');
|
||||
$table->string('remark', 255)->nullable()->comment('备注');
|
||||
$table->string('audit_remark', 255)->nullable()->comment('审核备注');
|
||||
$table->integer('created_at')->nullable()->comment('创建时间戳');
|
||||
$table->integer('updated_at')->nullable()->comment('更新时间戳');
|
||||
$table->integer('audit_at')->nullable()->comment('审核时间戳');
|
||||
$table->index('member_id');
|
||||
$table->index('account_id');
|
||||
$table->index('status');
|
||||
$table->index('created_at');
|
||||
$table->index('order_sn');
|
||||
});
|
||||
}
|
||||
|
||||
// 12. 会员提现账号表
|
||||
if (!$schema->hasTable('member_withdraw_account')) {
|
||||
$schema->create('member_withdraw_account', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('雪花ID');
|
||||
$table->bigInteger('member_id')->comment('会员ID');
|
||||
$table->tinyInteger('type')->comment('账号类型');
|
||||
$table->string('bank_name', 100)->nullable()->comment('银行名称');
|
||||
$table->string('account_name', 50)->nullable()->comment('账户名称');
|
||||
$table->string('account_number', 50)->nullable()->comment('账号号码');
|
||||
$table->string('branch_name', 100)->nullable()->comment('支行名称');
|
||||
$table->tinyInteger('is_default')->default(0)->comment('是否默认: 1-是 0-否');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 1-启用 0-禁用');
|
||||
$table->integer('created_at')->nullable()->comment('创建时间戳');
|
||||
$table->integer('updated_at')->nullable()->comment('更新时间戳');
|
||||
$table->integer('deleted_at')->nullable()->comment('删除时间戳');
|
||||
$table->index('member_id');
|
||||
$table->index('type');
|
||||
$table->index('is_default');
|
||||
$table->index('enabled');
|
||||
});
|
||||
}
|
||||
|
||||
echo "Created member tables.\n";
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
$schema->dropIfExists('member_withdraw_account');
|
||||
$schema->dropIfExists('member_withdraw');
|
||||
$schema->dropIfExists('member_third_party');
|
||||
$schema->dropIfExists('member_tag_relation');
|
||||
$schema->dropIfExists('member_tag_permission');
|
||||
$schema->dropIfExists('member_tag');
|
||||
$schema->dropIfExists('member_sign');
|
||||
$schema->dropIfExists('member_points');
|
||||
$schema->dropIfExists('member_menu');
|
||||
$schema->dropIfExists('member_level');
|
||||
$schema->dropIfExists('member_bill');
|
||||
$schema->dropIfExists('member');
|
||||
}
|
||||
};
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 创建代码生成相关表
|
||||
*
|
||||
* 表:
|
||||
* - generate_table (代码生成表配置表)
|
||||
* - generate_column (代码生成列配置表)
|
||||
*/
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
// 1. 代码生成表配置表(匹配现有模型)
|
||||
if (!$schema->hasTable('generate_table')) {
|
||||
$schema->create('generate_table', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键ID');
|
||||
$table->string('table_name', 100)->unique()->comment('表名');
|
||||
$table->string('table_content', 200)->nullable()->comment('表内容/注释');
|
||||
$table->string('module_name', 100)->comment('模块名');
|
||||
$table->string('class_name', 100)->nullable()->comment('类名');
|
||||
$table->tinyInteger('edit_type')->default(1)->comment('编辑类型');
|
||||
$table->string('plugin_name', 100)->nullable()->comment('插件名');
|
||||
$table->tinyInteger('order_type')->default(0)->comment('排序类型');
|
||||
$table->string('parent_menu', 100)->nullable()->comment('父级菜单');
|
||||
$table->text('relations')->nullable()->comment('关联关系');
|
||||
$table->integer('push_sync_count')->default(0)->comment('推送同步计数');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 1=启用 0=停用');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建者');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新者');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
$table->longText('remark')->nullable()->comment('备注');
|
||||
$table->index('table_name');
|
||||
$table->index('module_name');
|
||||
});
|
||||
}
|
||||
|
||||
// 2. 代码生成列配置表(匹配现有模型)
|
||||
if (!$schema->hasTable('generate_column')) {
|
||||
$schema->create('generate_column', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键ID');
|
||||
$table->bigInteger('table_id')->comment('表ID');
|
||||
$table->string('column_name', 100)->comment('列名');
|
||||
$table->string('column_comment', 200)->nullable()->comment('列注释');
|
||||
$table->string('column_type', 50)->comment('列类型');
|
||||
$table->tinyInteger('is_required')->default(0)->comment('是否必填: 1=是 0=否');
|
||||
$table->tinyInteger('is_pk')->default(0)->comment('是否主键: 1=是 0=否');
|
||||
$table->tinyInteger('is_insert')->default(1)->comment('是否插入字段: 1=是 0=否');
|
||||
$table->tinyInteger('is_update')->default(1)->comment('是否更新字段: 1=是 0=否');
|
||||
$table->tinyInteger('is_lists')->default(1)->comment('是否列表字段: 1=是 0=否');
|
||||
$table->tinyInteger('is_query')->default(0)->comment('是否查询字段: 1=是 0=否');
|
||||
$table->tinyInteger('is_search')->default(0)->comment('是否搜索字段: 1=是 0=否');
|
||||
$table->string('query_type', 50)->nullable()->comment('查询方式');
|
||||
$table->string('view_type', 50)->nullable()->comment('视图类型');
|
||||
$table->string('dict_type', 100)->nullable()->comment('字典类型');
|
||||
$table->string('plugin', 100)->nullable()->comment('插件');
|
||||
$table->string('model', 100)->nullable()->comment('模型');
|
||||
$table->integer('sort')->default(0)->comment('排序');
|
||||
$table->string('label_key', 100)->nullable()->comment('标签键');
|
||||
$table->string('value_key', 100)->nullable()->comment('值键');
|
||||
$table->bigInteger('create_time')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('update_time')->nullable()->comment('更新时间');
|
||||
$table->tinyInteger('is_delete')->default(0)->comment('是否删除: 1=是 0=否');
|
||||
$table->tinyInteger('is_order')->default(0)->comment('是否排序: 1=是 0=否');
|
||||
$table->string('validate_type', 50)->nullable()->comment('验证类型');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 1=启用 0=停用');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建者');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新者');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
$table->longText('remark')->nullable()->comment('备注');
|
||||
$table->index('table_id');
|
||||
$table->index('column_name');
|
||||
$table->index('is_query');
|
||||
$table->index(['table_id', 'column_name']);
|
||||
$table->foreign('table_id')->references('id')->on('generate_table')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
// 删除外键约束
|
||||
if ($schema->hasTable('generate_column')) {
|
||||
$schema->table('generate_column', function (Blueprint $table) {
|
||||
$table->dropForeign(['table_id']);
|
||||
});
|
||||
}
|
||||
|
||||
// 删除表
|
||||
$schema->dropIfExists('generate_column');
|
||||
$schema->dropIfExists('generate_table');
|
||||
}
|
||||
};
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return new class {
|
||||
public function up(Builder $schema): void
|
||||
{
|
||||
if (!$schema->hasTable('plugin_application_auth')) {
|
||||
$schema->create('plugin_application_auth', function (Blueprint $table) {
|
||||
$table->bigInteger('id')->primary()->comment('主键');
|
||||
$table->string('name', 100)->comment('应用名称');
|
||||
$table->string('access_key', 64)->unique()->comment('Access Key');
|
||||
$table->string('secret_key', 128)->comment('Secret Key');
|
||||
$table->bigInteger('expired_at')->nullable()->comment('失效时间');
|
||||
$table->tinyInteger('enabled')->default(1)->comment('状态: 1正常 0停用');
|
||||
$table->longText('description')->nullable()->comment('描述');
|
||||
$table->bigInteger('created_by')->nullable()->comment('创建者');
|
||||
$table->bigInteger('updated_by')->nullable()->comment('更新者');
|
||||
$table->bigInteger('created_at')->nullable()->comment('创建时间');
|
||||
$table->bigInteger('updated_at')->nullable()->comment('修改时间');
|
||||
$table->bigInteger('deleted_at')->nullable()->comment('删除时间');
|
||||
$table->index('name');
|
||||
$table->index('enabled');
|
||||
$table->index('expired_at');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public function down(Builder $schema): void
|
||||
{
|
||||
$schema->dropIfExists('plugin_application_auth');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace resource\database\seeds;
|
||||
|
||||
use app\model\system\Admin;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AdminSeeder extends Seeder
|
||||
{
|
||||
private ?array $adminParams = null;
|
||||
|
||||
/**
|
||||
* 设置管理员参数
|
||||
*/
|
||||
public function setAdminParams(array $params): void
|
||||
{
|
||||
$this->adminParams = $params;
|
||||
}
|
||||
|
||||
public function run(): void
|
||||
{
|
||||
// 清空表
|
||||
Admin::truncate();
|
||||
|
||||
// 检查是否已存在管理员
|
||||
$existingAdmin = Admin::find(1);
|
||||
if ($existingAdmin) {
|
||||
// 更新现有管理员
|
||||
if ($this->adminParams) {
|
||||
$existingAdmin->user_name = $this->adminParams['username'];
|
||||
$existingAdmin->password = password_hash($this->adminParams['password'], PASSWORD_DEFAULT);
|
||||
$existingAdmin->real_name = '超级管理员';
|
||||
$existingAdmin->nick_name = '超级管理员';
|
||||
$existingAdmin->is_super = 1;
|
||||
$existingAdmin->enabled = 1;
|
||||
$existingAdmin->email = $this->adminParams['email'] ?? 'admin@example.com';
|
||||
$existingAdmin->save();
|
||||
}
|
||||
} else {
|
||||
// 创建新管理员
|
||||
$username = $this->adminParams['username'] ?? 'admin';
|
||||
$password = $this->adminParams['password'] ?? '123456';
|
||||
|
||||
$hashedPassword = password_hash($password, PASSWORD_DEFAULT);
|
||||
Admin::create([
|
||||
'id' => 1,
|
||||
'user_name' => $username,
|
||||
'real_name' => '超级管理员',
|
||||
'nick_name' => '超级管理员',
|
||||
'password' => $hashedPassword,
|
||||
'email' => 'admin@example.com',
|
||||
'avatar' => '',
|
||||
'is_super' => 1,
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* 系统配置种子
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
namespace resource\database\seeds;
|
||||
|
||||
use app\model\system\Config;
|
||||
use core\uuid\Snowflake;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class ConfigSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
// 清空表
|
||||
Config::truncate();
|
||||
|
||||
$configs = include base_path('resource/data/config/config.php');
|
||||
|
||||
// 插入配置项
|
||||
foreach ($configs as $config) {
|
||||
Config::create([
|
||||
'id'=>Snowflake::generate(),
|
||||
'group_code' => $config['group_code'] ?? '',
|
||||
'code' => $config['code'] ?? '',
|
||||
'name' => $config['name'] ?? '',
|
||||
'content' => is_array($config['content'] ?? '') ? json_encode($config['content'], JSON_UNESCAPED_UNICODE) : ($config['content'] ?? ''),
|
||||
'is_sys' => $config['is_sys'] ?? 0,
|
||||
'enabled' => $config['enabled'] ?? 1,
|
||||
'created_at' => $config['created_at'] ?? time(),
|
||||
'updated_at' => $config['updated_at'] ?? time(),
|
||||
'deleted_at' => $config['deleted_at'] ?? null,
|
||||
'remark' => $config['remark'] ?? '',
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* 数据字典种子
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
namespace resource\database\seeds;
|
||||
|
||||
use app\model\dict\Dict;
|
||||
use app\model\dict\DictItem;
|
||||
use core\uuid\Snowflake;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DictSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
// 清空表
|
||||
DictItem::truncate();
|
||||
Dict::truncate();
|
||||
|
||||
$dict = include base_path('resource/data/dict/dict.php');
|
||||
|
||||
// 插入字典组
|
||||
foreach ($dict as $group) {
|
||||
$dictId=Snowflake::generate();
|
||||
Dict::create([
|
||||
'id' => $dictId,
|
||||
'group_code' => $group['group_code'] ?? '',
|
||||
'name' => $group['name'] ?? '',
|
||||
'code' => $group['code'] ?? '',
|
||||
'sort' => $group['sort'] ?? 0,
|
||||
'data_type' => $group['data_type'] ?? 0,
|
||||
'description' => $group['description'] ?? '',
|
||||
'enabled' => $group['enabled'] ?? 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
]);
|
||||
|
||||
// 插入字典项
|
||||
if (!empty($group['items'])) {
|
||||
foreach ($group['items'] as $item) {
|
||||
DictItem::create([
|
||||
'id' => Snowflake::generate(),
|
||||
'dict_id' => $dictId,
|
||||
'label' => $item['label'] ?? '',
|
||||
'value' => $item['value'] ?? '',
|
||||
'code' => $item['code'] ?? '',
|
||||
'sort' => $item['sort'] ?? 0,
|
||||
'enabled' => $item['enabled'] ?? 1,
|
||||
'created_by' => 1,
|
||||
'updated_by' => 1,
|
||||
'remark' => $item['remark'] ?? '',
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
namespace resource\database\seeds;
|
||||
|
||||
use app\model\member\MemberLevel;
|
||||
use core\uuid\Snowflake;
|
||||
use Illuminate\Database\Seeder;
|
||||
use support\Db;
|
||||
|
||||
class MemberLevelSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$data = [
|
||||
[
|
||||
'name' => '黄金',
|
||||
'level' => 1,
|
||||
'min_points' => 0,
|
||||
'max_points' => 99,
|
||||
'discount' => 0.00,
|
||||
'icon' => 'ant-design:account-book-filled',
|
||||
'color' => null,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
],
|
||||
[
|
||||
'name' => '铂金',
|
||||
'level' => 2,
|
||||
'min_points' => 100,
|
||||
'max_points' => 999,
|
||||
'discount' => 9.80,
|
||||
'icon' => 'ant-design:android-outlined',
|
||||
'color' => null,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
],
|
||||
[
|
||||
'name' => '钻石',
|
||||
'level' => 3,
|
||||
'min_points' => 1000,
|
||||
'max_points' => 4999,
|
||||
'discount' => 9.00,
|
||||
'icon' => 'ant-design:ant-cloud-outlined',
|
||||
'color' => null,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
],
|
||||
[
|
||||
'name' => '星耀',
|
||||
'level' => 4,
|
||||
'min_points' => 5000,
|
||||
'max_points' => 9999,
|
||||
'discount' => 8.00,
|
||||
'icon' => 'ant-design:ant-cloud-outlined',
|
||||
'color' => null,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
],
|
||||
[
|
||||
'name' => '王者',
|
||||
'level' => 5,
|
||||
'min_points' => 10000,
|
||||
'max_points' => 9999999,
|
||||
'discount' => 7.00,
|
||||
'icon' => 'ant-design:ant-cloud-outlined',
|
||||
'color' => null,
|
||||
'description' => '',
|
||||
'enabled' => 1,
|
||||
'created_at' => time(),
|
||||
'updated_at' => time(),
|
||||
],
|
||||
];
|
||||
|
||||
// 清空表数据
|
||||
Db::table('member_level')->truncate();
|
||||
// 插入数据
|
||||
foreach ($data as $item) {
|
||||
$item['id'] = Snowflake::generate();
|
||||
MemberLevel::create($item);
|
||||
}
|
||||
echo "Member level seed completed successfully!\n";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
/**
|
||||
* 菜单数据种子
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
namespace resource\database\seeds;
|
||||
|
||||
use app\model\system\Menu;
|
||||
use core\uuid\Snowflake;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
|
||||
class MenuSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
// 清空表
|
||||
Menu::truncate();
|
||||
|
||||
$menus = include base_path('resource/data/menu/admin.php');
|
||||
|
||||
// 插入菜单数据
|
||||
foreach ($menus as $menu) {
|
||||
$this->insertMenu($menu, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归插入菜单
|
||||
*/
|
||||
private function insertMenu(array $menu, int|string $pid): void
|
||||
{
|
||||
$menuModel = new Menu();
|
||||
$menuModel->id = Snowflake::generate();
|
||||
$menuModel->pid = $pid;
|
||||
$menuModel->title = $menu['title'] ?? '';
|
||||
$menuModel->app = $menu['app'] ?? 'admin';
|
||||
$menuModel->code = $menu['code'] ?? '';
|
||||
$menuModel->icon = $menu['icon'] ?? '';
|
||||
$menuModel->sort = $menu['sort'] ?? 0;
|
||||
$menuModel->type = $menu['type'] ?? 1;
|
||||
$menuModel->is_show = $menu['is_show'] ?? 1;
|
||||
$menuModel->is_link = $menu['is_link'] ?? 0;
|
||||
$menuModel->is_cache = $menu['is_cache'] ?? 0;
|
||||
$menuModel->path = $menu['path'] ?? '';
|
||||
$menuModel->component = $menu['component'] ?? '';
|
||||
$menuModel->redirect = $menu['redirect'] ?? '';
|
||||
$menuModel->enabled = $menu['enabled'] ?? 1;
|
||||
$menuModel->save();
|
||||
|
||||
// 递归插入子菜单
|
||||
if (!empty($menu['children'])) {
|
||||
foreach ($menu['children'] as $child) {
|
||||
$this->insertMenu($child, $menuModel->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* 前端菜单种子
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
namespace resource\database\seeds;
|
||||
|
||||
use app\model\web\Menu;
|
||||
use core\uuid\Snowflake;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class WebMenuSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
// 清空表
|
||||
Menu::truncate();
|
||||
|
||||
$menus = include base_path('resource/data/menu/web.php');
|
||||
|
||||
// 插入菜单数据
|
||||
foreach ($menus as $menu) {
|
||||
$this->insertMenu($menu, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归插入菜单
|
||||
*/
|
||||
private function insertMenu(array $menu, int|string $pid): void
|
||||
{
|
||||
$menuModel = new Menu();
|
||||
$menuModel->id = Snowflake::generate();
|
||||
$menuModel->pid = $pid;
|
||||
$menuModel->app = $menu['app'] ?? 'web';
|
||||
$menuModel->category = $menu['category'] ?? 1;
|
||||
$menuModel->source = $menu['source'] ?? 'system';
|
||||
$menuModel->code = $menu['code'] ?? '';
|
||||
$menuModel->name = $menu['name'] ?? '';
|
||||
$menuModel->url = $menu['url'] ?? '';
|
||||
$menuModel->icon = $menu['icon'] ?? '';
|
||||
$menuModel->level = $menu['level'] ?? 1;
|
||||
$menuModel->type = $menu['type'] ?? 1;
|
||||
$menuModel->sort = $menu['sort'] ?? 0;
|
||||
$menuModel->target = $menu['target'] ?? 1;
|
||||
$menuModel->is_show = $menu['is_show'] ?? 1;
|
||||
$menuModel->enabled = $menu['enabled'] ?? 1;
|
||||
$menuModel->created_at = $menu['created_at'] ?? time();
|
||||
$menuModel->updated_at = $menu['updated_at'] ?? time();
|
||||
$menuModel->deleted_at = $menu['deleted_at'] ?? null;
|
||||
$menuModel->save();
|
||||
|
||||
// 递归插入子菜单
|
||||
if (!empty($menu['children'])) {
|
||||
foreach ($menu['children'] as $child) {
|
||||
$this->insertMenu($child, $menuModel->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
不包含关联的依赖组件
|
||||
1.webman/database:
|
||||
composer require -W webman/database illuminate/pagination illuminate/events symfony/var-dumper
|
||||
|
||||
2.webman/redis:
|
||||
composer require -W webman/redis illuminate/events
|
||||
|
||||
3.webman/cache
|
||||
composer require -W webman/cache
|
||||
|
||||
4.redis队列
|
||||
composer require webman/redis-queue
|
||||
|
||||
5.top-think/think-validate
|
||||
composer require topthink/think-validate
|
||||
|
||||
6.webman/captcha
|
||||
composer require webman/captcha
|
||||
|
||||
7.event事件
|
||||
composer require webman/event
|
||||
|
||||
8.workerman/crontab
|
||||
composer require workerman/crontab
|
||||
|
||||
9.webman/console 命令行插件
|
||||
webman/console 命令行插件
|
||||
|
||||
10.webman/push
|
||||
composer require webman/push
|
||||
|
||||
|
||||
11.webman-tech/symfony-lock
|
||||
composer require webman-tech/symfony-lock
|
||||
|
||||
12.macroable
|
||||
composer require spatie/macroable
|
||||
|
||||
13.ramsey/uuid
|
||||
composer require ramsey/uuid
|
||||
|
||||
14.env组件
|
||||
composer require vlucas/phpdotenv
|
||||
|
||||
15.url处理
|
||||
composer require guzzlehttp/guzzle
|
||||
|
||||
16.phpmailer/phpmailer
|
||||
composer require phpmailer/phpmailer
|
||||
|
||||
17.短信处理
|
||||
composer require "overtrue/easy-sms"
|
||||
|
||||
18.firebase/php-jwt
|
||||
composer require firebase/php-jwt
|
||||
|
||||
19.madong/madong-helper
|
||||
composer require madong/madong-helper
|
||||
|
||||
20.数据迁移工具
|
||||
composer require robmorgan/phinx
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>MDAdmin 软件许可协议</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
min-height: 100vh;
|
||||
}
|
||||
.license-container {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
background: white;
|
||||
border-radius: 15px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.license-content {
|
||||
padding: 40px;
|
||||
}
|
||||
.license-section {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.license-section h2 {
|
||||
color: #667eea;
|
||||
border-bottom: 2px solid #e8e8e8;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 15px;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
.license-section p {
|
||||
margin-bottom: 15px;
|
||||
text-align: justify;
|
||||
}
|
||||
.license-list {
|
||||
list-style-type: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
.license-list li {
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
position: relative;
|
||||
padding-left: 25px;
|
||||
}
|
||||
.license-list li:before {
|
||||
content: "•";
|
||||
color: #667eea;
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 8px;
|
||||
}
|
||||
.important-note {
|
||||
background: #fff3cd;
|
||||
border-left: 4px solid #ffc107;
|
||||
padding: 15px;
|
||||
margin: 20px 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.warning {
|
||||
background: #f8d7da;
|
||||
border-left: 4px solid #dc3545;
|
||||
padding: 15px;
|
||||
margin: 20px 0;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="license-container">
|
||||
<div class="license-content">
|
||||
<div class="license-section">
|
||||
<h2>1. 许可授予</h2>
|
||||
<p>本协议是您(个人或单一实体)与 MDAdmin 开发团队之间关于 MDAdmin 软件产品的法律协议。一旦安装、复制或以其他方式使用本软件产品,即表示您同意接受本协议各项条款的约束。</p>
|
||||
</div>
|
||||
|
||||
<div class="license-section">
|
||||
<h2>2. 软件使用</h2>
|
||||
<p>MDAdmin 是一个基于 PHP 的开源后台管理系统,遵循 MIT 许可证发布。您可以在遵守以下条款的前提下自由使用:</p>
|
||||
<ul class="license-list">
|
||||
<li>允许个人或商业用途</li>
|
||||
<li>允许修改和分发</li>
|
||||
<li>允许用于商业项目</li>
|
||||
<li>无需支付许可费用</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="license-section">
|
||||
<h2>3. 限制条款</h2>
|
||||
<p>在使用本软件时,您必须遵守以下限制:</p>
|
||||
<ul class="license-list">
|
||||
<li>不得将本软件用于任何非法目的</li>
|
||||
<li>不得删除或修改软件中的版权声明</li>
|
||||
<li>不得对软件进行反向工程、反编译或反汇编</li>
|
||||
<li>不得将本软件用于损害他人利益的行为</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="license-section">
|
||||
<h2>4. 免责声明</h2>
|
||||
<p>本软件按"原样"提供,不附带任何明示或暗示的担保,包括但不限于对适销性、特定用途适用性和非侵权性的担保。在任何情况下,作者或版权持有人均不对因使用本软件而导致的任何索赔、损害或其他责任负责。</p>
|
||||
</div>
|
||||
|
||||
<div class="license-section">
|
||||
<h2>5. 技术支持</h2>
|
||||
<p>MDAdmin 提供以下技术支持服务:</p>
|
||||
<ul class="license-list">
|
||||
<li>官方文档和教程</li>
|
||||
<li>社区论坛支持</li>
|
||||
<li>GitHub Issues 问题跟踪</li>
|
||||
<li>定期版本更新和安全补丁</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="important-note">
|
||||
<strong>重要提示:</strong> 在安装和使用本软件前,请确保您已仔细阅读并理解本协议的所有条款。如果您不同意本协议的条款,请不要安装或使用本软件。
|
||||
</div>
|
||||
|
||||
<div class="warning">
|
||||
<strong>警告:</strong> 未经授权的修改或分发可能导致法律后果。请尊重知识产权,遵守开源协议。
|
||||
</div>
|
||||
|
||||
<div class="license-section">
|
||||
<h2>6. 协议变更</h2>
|
||||
<p>MDAdmin 开发团队保留随时修改本协议条款的权利。修改后的协议将在官方网站公布,继续使用本软件即表示您接受修改后的协议。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
// 操作反馈(成功/失败/确认)
|
||||
'operation' => [
|
||||
'success' => 'Success',
|
||||
'fail' => 'Failed',
|
||||
'save' => [
|
||||
'success' => 'Saved successfully',
|
||||
'fail' => 'Save failed',
|
||||
'confirm' => 'Confirm save?',
|
||||
],
|
||||
'delete' => [
|
||||
'success' => 'Deleted successfully',
|
||||
'fail' => 'Delete failed',
|
||||
'confirm' => 'Confirm delete?',
|
||||
],
|
||||
'update' => [
|
||||
'success' => 'Updated successfully',
|
||||
'fail' => 'Update failed',
|
||||
],
|
||||
'submit' => [
|
||||
'success' => 'Submitted successfully',
|
||||
'fail' => 'Submit failed',
|
||||
'confirm' => 'Confirm submit?',
|
||||
],
|
||||
'upload' => [
|
||||
'success' => 'Uploaded successfully',
|
||||
'fail' => 'Upload failed',
|
||||
'too_large' => 'File too large',
|
||||
'invalid_type' => 'Invalid file type',
|
||||
],
|
||||
'download' => [
|
||||
'success' => 'Downloaded successfully',
|
||||
'fail' => 'Download failed',
|
||||
],
|
||||
],
|
||||
|
||||
// 通用交互动作(按钮/导航/数据操作)
|
||||
'action' => [
|
||||
'confirm' => 'Confirm',
|
||||
'ensure' => 'Ensure',
|
||||
'yes' => 'Yes',
|
||||
'ok' => 'OK',
|
||||
'no' => 'No',
|
||||
'cancel' => 'Cancel',
|
||||
'abort' => 'Abort',
|
||||
'back' => 'Back',
|
||||
'return' => 'Return',
|
||||
'next' => 'Next',
|
||||
'continue' => 'Continue',
|
||||
'previous' => 'Previous',
|
||||
'home' => 'Home',
|
||||
'save' => 'Save',
|
||||
'store' => 'Store',
|
||||
'edit' => 'Edit',
|
||||
'modify' => 'Modify',
|
||||
'update' => 'Update',
|
||||
'refresh' => 'Refresh',
|
||||
'reset' => 'Reset',
|
||||
'clear' => 'Clear',
|
||||
'add' => 'Add',
|
||||
'create' => 'Create',
|
||||
'delete' => 'Delete',
|
||||
'remove' => 'Remove',
|
||||
'view' => 'View',
|
||||
'detail' => 'Detail',
|
||||
'search' => 'Search',
|
||||
'filter' => 'Filter',
|
||||
'import' => 'Import',
|
||||
'export' => 'Export',
|
||||
'print' => 'Print',
|
||||
'help' => 'Help',
|
||||
'settings' => 'Settings',
|
||||
'close' => 'Close',
|
||||
'exit' => 'Exit',
|
||||
],
|
||||
|
||||
// 状态提示(加载/错误/成功等)
|
||||
'status' => [
|
||||
'loading' => 'Loading...',
|
||||
'processing' => 'Processing...',
|
||||
'please_wait' => 'Please wait...',
|
||||
'success' => 'Success',
|
||||
'completed' => 'Completed',
|
||||
'failure' => 'Failure',
|
||||
'fail' => 'Failed',
|
||||
'error' => 'Error',
|
||||
'warning' => 'Warning',
|
||||
'info' => 'Information',
|
||||
'no_data' => 'No data available',
|
||||
'permission_denied' => 'Permission denied',
|
||||
'login_expired' => 'Login expired',
|
||||
'network_error' => 'Network connection error', // 原网络错误(泛化)
|
||||
'server_error' => 'Internal server error', // 原服务器错误(泛化)
|
||||
'request_timeout' => 'Request timed out', // 原请求超时(泛化)
|
||||
],
|
||||
|
||||
// 网络异常(HTTP 状态码 + 具体网络错误)
|
||||
'http' => [
|
||||
// 状态码(语义化键名 + 数字键名双映射)
|
||||
'bad_request_400' => 'Bad Request',
|
||||
'400' => 'Bad Request',
|
||||
'unauthorized_401' => 'Unauthorized',
|
||||
'401' => 'Unauthorized',
|
||||
'forbidden_403' => 'Forbidden',
|
||||
'403' => 'Forbidden',
|
||||
'not_found_404' => 'Not Found',
|
||||
'404' => 'Not Found',
|
||||
'method_not_allowed_405' => 'Method Not Allowed',
|
||||
'405' => 'Method Not Allowed',
|
||||
'request_timeout_408' => 'Request Timeout',
|
||||
'408' => 'Request Timeout',
|
||||
'too_many_requests_429' => 'Too Many Requests',
|
||||
'429' => 'Too Many Requests',
|
||||
'internal_server_error_500' => 'Internal Server Error',
|
||||
'500' => 'Internal Server Error',
|
||||
'bad_gateway_502' => 'Bad Gateway',
|
||||
'502' => 'Bad Gateway',
|
||||
'service_unavailable_503' => 'Service Unavailable',
|
||||
'503' => 'Service Unavailable',
|
||||
'gateway_timeout_504' => 'Gateway Timeout',
|
||||
'504' => 'Gateway Timeout',
|
||||
|
||||
// 网络异常描述(非状态码)
|
||||
'connection_refused' => 'Connection refused',
|
||||
'dns_lookup_failed' => 'DNS lookup failed',
|
||||
'ssl_handshake_failed' => 'SSL handshake failed',
|
||||
'resource_unavailable' => 'Resource temporarily unavailable',
|
||||
],
|
||||
|
||||
// 基础界面元素
|
||||
'ui' => [
|
||||
'dashboard' => 'Dashboard',
|
||||
'profile' => 'Profile',
|
||||
'account' => 'Account',
|
||||
'notification' => 'Notification',
|
||||
'message' => 'Message',
|
||||
'log' => 'Log',
|
||||
'history' => 'History',
|
||||
'about' => 'About',
|
||||
'contact' => 'Contact',
|
||||
'language' => 'Language',
|
||||
'theme' => 'Theme',
|
||||
'version' => 'Version',
|
||||
'copyright' => 'Copyright',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* 菜单翻译
|
||||
*/
|
||||
return [
|
||||
//首页
|
||||
'首页' => 'Home',
|
||||
'工作台' => 'Workspace',
|
||||
'分析页' => 'Dashboard',
|
||||
|
||||
//公共
|
||||
'编辑' => 'Edit',
|
||||
'新增' => 'Add',
|
||||
'删除' => 'Delete',
|
||||
'详情' => 'Detail',
|
||||
'导出' => 'Export',
|
||||
|
||||
//系统设置
|
||||
'用户' => 'User',
|
||||
'菜单管理' => 'Menu',
|
||||
'职位管理' => 'Position',
|
||||
'字典项列表' => 'DictList',
|
||||
'字典项添加' => 'DictAdd',
|
||||
'字典项删除' => 'DictDelete',
|
||||
'字典项编辑' => 'DictEdit',
|
||||
'数据中心' => 'DataCenter',
|
||||
'角色管理' => 'Role',
|
||||
'部门管理' => 'Department',
|
||||
'登录日志' => 'LoginLog',
|
||||
'冻结用户' => 'FreezeUser',
|
||||
'取消冻结' => 'Unfreeze',
|
||||
'通知公告' => 'Notice',
|
||||
'数据回收' => 'RecycleBin',
|
||||
'数据字典' => 'DataDict',
|
||||
'授权' => 'Authorize',
|
||||
'授权角色' => 'AssignRole',
|
||||
'系统监控' => 'Monitor',
|
||||
'系统参数' => 'SystemConfig',
|
||||
'系统设置' => 'Setting',
|
||||
'用户管理' => 'User',
|
||||
'移除用户' => 'RemoveUser',
|
||||
'附件管理' => 'Attachment',
|
||||
|
||||
//系统监控
|
||||
'性能监控' => 'Performance',
|
||||
'Redis监控' => 'RedisMonitor',
|
||||
'操作日志' => 'OperationLog',
|
||||
|
||||
//系统工具
|
||||
|
||||
//业务流程
|
||||
'业务流程' => 'Workflow',
|
||||
'流程查询' => 'Query',
|
||||
'流程设置' => 'Setting',
|
||||
'流程设计' => 'Design',
|
||||
'表单设计' => 'FormDesign',
|
||||
'基础功能' => 'BasicFunc',
|
||||
'流程类型' => 'Type',
|
||||
'委托设置' => 'Delegate',
|
||||
'流程定义' => 'Definition',
|
||||
'我的申请' => 'MyRequest',
|
||||
'我的收藏' => 'Bookmark',
|
||||
'我的已办' => 'Completed',
|
||||
'待阅' => 'PendingRead',
|
||||
'待办' => 'Todo',
|
||||
'发起' => 'Launch',
|
||||
'恢复' => 'Restore',
|
||||
|
||||
//开发平台
|
||||
'开发平台' => 'Dev',
|
||||
'代码生成' => 'CodeGeneration',
|
||||
'定时任务' => 'ScheduledTasks',
|
||||
'网关管理' => 'Gateway',
|
||||
'限流规则' => 'Rate Limiting Rules',
|
||||
'限访名单' => 'Access Restriction List',
|
||||
'在线开发' => 'Online Development',
|
||||
//平台管理
|
||||
'平台管理' => 'Platform',
|
||||
'账套管理' => 'AccountManagement',
|
||||
'账套中心' => 'AccountCenter',
|
||||
'多数据源' => 'MultiDataSource',
|
||||
//人工智能
|
||||
'人工智能' => 'AI',
|
||||
'智能问答' => 'Agent',
|
||||
|
||||
];
|
||||
@@ -0,0 +1,330 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong - System Default Language Package
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
return [
|
||||
// User Management
|
||||
'user' => [
|
||||
'title' => 'User Management',
|
||||
'not_exist' => 'User does not exist',
|
||||
'create_success' => 'User created successfully',
|
||||
'create_fail' => 'User creation failed',
|
||||
'update_success' => 'User updated successfully',
|
||||
'update_fail' => 'User update failed',
|
||||
'delete_success' => 'User deleted successfully',
|
||||
'delete_fail' => 'User deletion failed',
|
||||
'enable_success' => 'User enabled successfully',
|
||||
'enable_fail' => 'User enable failed',
|
||||
'disable_success' => 'User disabled successfully',
|
||||
'disable_fail' => 'User disable failed',
|
||||
'lock_success' => 'User locked successfully',
|
||||
'lock_fail' => 'User lock failed',
|
||||
'unlock_success' => 'User unlocked successfully',
|
||||
'unlock_fail' => 'User unlock failed',
|
||||
'password_reset_success' => 'Password reset successfully',
|
||||
'password_reset_fail' => 'Password reset failed',
|
||||
'username_exist' => 'Username already exists',
|
||||
'email_exist' => 'Email already exists',
|
||||
'mobile_exist' => 'Mobile number already exists',
|
||||
'admin_not_editable' => 'Super admin cannot be edited',
|
||||
'admin_not_deletable' => 'Super admin cannot be deleted',
|
||||
],
|
||||
|
||||
// Role Management
|
||||
'role' => [
|
||||
'title' => 'Role Management',
|
||||
'not_exist' => 'Role does not exist',
|
||||
'create_success' => 'Role created successfully',
|
||||
'create_fail' => 'Role creation failed',
|
||||
'update_success' => 'Role updated successfully',
|
||||
'update_fail' => 'Role update failed',
|
||||
'delete_success' => 'Role deleted successfully',
|
||||
'delete_fail' => 'Role deletion failed',
|
||||
'assign_success' => 'Role assigned successfully',
|
||||
'assign_fail' => 'Role assignment failed',
|
||||
'admin_role_not_editable' => 'Admin role cannot be edited',
|
||||
'admin_role_not_deletable' => 'Admin role cannot be deleted',
|
||||
'in_use' => 'Role is in use, cannot be deleted',
|
||||
'permission' => [
|
||||
'assign_success' => 'Permission assigned successfully',
|
||||
'assign_fail' => 'Permission assignment failed',
|
||||
'update_success' => 'Permission updated successfully',
|
||||
'update_fail' => 'Permission update failed',
|
||||
],
|
||||
],
|
||||
|
||||
// Menu Management
|
||||
'menu' => [
|
||||
'title' => 'Menu Management',
|
||||
'not_exist' => 'Menu does not exist',
|
||||
'create_success' => 'Menu created successfully',
|
||||
'create_fail' => 'Menu creation failed',
|
||||
'update_success' => 'Menu updated successfully',
|
||||
'update_fail' => 'Menu update failed',
|
||||
'delete_success' => 'Menu deleted successfully',
|
||||
'delete_fail' => 'Menu deletion failed',
|
||||
'move_success' => 'Menu moved successfully',
|
||||
'move_fail' => 'Menu move failed',
|
||||
'has_children' => 'Has submenus, cannot be deleted',
|
||||
'type' => [
|
||||
'directory' => 'Directory',
|
||||
'menu' => 'Menu',
|
||||
'button' => 'Button',
|
||||
],
|
||||
'status' => [
|
||||
'enabled' => 'Enabled',
|
||||
'disabled' => 'Disabled',
|
||||
],
|
||||
],
|
||||
|
||||
// Data Dictionary
|
||||
'dict' => [
|
||||
'title' => 'Data Dictionary',
|
||||
'not_exist' => 'Dictionary does not exist',
|
||||
'create_success' => 'Dictionary created successfully',
|
||||
'create_fail' => 'Dictionary creation failed',
|
||||
'update_success' => 'Dictionary updated successfully',
|
||||
'update_fail' => 'Dictionary update failed',
|
||||
'delete_success' => 'Dictionary deleted successfully',
|
||||
'delete_fail' => 'Dictionary deletion failed',
|
||||
'item' => [
|
||||
'not_exist' => 'Dictionary item does not exist',
|
||||
'create_success' => 'Dictionary item created successfully',
|
||||
'create_fail' => 'Dictionary item creation failed',
|
||||
'update_success' => 'Dictionary item updated successfully',
|
||||
'update_fail' => 'Dictionary item update failed',
|
||||
'delete_success' => 'Dictionary item deleted successfully',
|
||||
'delete_fail' => 'Dictionary item deletion failed',
|
||||
],
|
||||
],
|
||||
|
||||
// Department Management
|
||||
'dept' => [
|
||||
'title' => 'Department Management',
|
||||
'not_exist' => 'Department does not exist',
|
||||
'create_success' => 'Department created successfully',
|
||||
'create_fail' => 'Department creation failed',
|
||||
'update_success' => 'Department updated successfully',
|
||||
'update_fail' => 'Department update failed',
|
||||
'delete_success' => 'Department deleted successfully',
|
||||
'delete_fail' => 'Department deletion failed',
|
||||
'has_children' => 'Has subdepartments, cannot be deleted',
|
||||
'has_users' => 'Has users, cannot be deleted',
|
||||
],
|
||||
|
||||
// Post Management
|
||||
'post' => [
|
||||
'title' => 'Post Management',
|
||||
'not_exist' => 'Post does not exist',
|
||||
'create_success' => 'Post created successfully',
|
||||
'create_fail' => 'Post creation failed',
|
||||
'update_success' => 'Post updated successfully',
|
||||
'update_fail' => 'Post update failed',
|
||||
'delete_success' => 'Post deleted successfully',
|
||||
'delete_fail' => 'Post deletion failed',
|
||||
'has_users' => 'Has users, cannot be deleted',
|
||||
],
|
||||
|
||||
// System Configuration
|
||||
'config' => [
|
||||
'title' => 'System Configuration',
|
||||
'not_exist' => 'Configuration does not exist',
|
||||
'update_success' => 'Configuration updated successfully',
|
||||
'update_fail' => 'Configuration update failed',
|
||||
'group' => [
|
||||
'system' => 'System Settings',
|
||||
'security' => 'Security Settings',
|
||||
'mail' => 'Mail Settings',
|
||||
'sms' => 'SMS Settings',
|
||||
'storage' => 'Storage Settings',
|
||||
],
|
||||
'cache_cleared' => 'Configuration cache cleared',
|
||||
],
|
||||
|
||||
// Recycle Bin
|
||||
'recycle' => [
|
||||
'title' => 'Recycle Bin',
|
||||
'not_exist' => 'Recycle item does not exist',
|
||||
'recycle_success' => 'Data recycled successfully',
|
||||
'recycle_fail' => 'Data recycle failed',
|
||||
'restore_success' => 'Data restored successfully',
|
||||
'restore_fail' => 'Data restore failed',
|
||||
'delete_success' => 'Data permanently deleted successfully',
|
||||
'delete_fail' => 'Data permanent deletion failed',
|
||||
'empty_success' => 'Recycle bin emptied successfully',
|
||||
'empty_fail' => 'Recycle bin empty failed',
|
||||
'type' => [
|
||||
'user' => 'User',
|
||||
'role' => 'Role',
|
||||
'menu' => 'Menu',
|
||||
'dept' => 'Department',
|
||||
'post' => 'Post',
|
||||
'dict' => 'Dictionary',
|
||||
'attachment' => 'Attachment',
|
||||
],
|
||||
],
|
||||
|
||||
// Operate Log
|
||||
'operate_log' => [
|
||||
'title' => 'Operate Log',
|
||||
'not_exist' => 'Log does not exist',
|
||||
'clear_success' => 'Log cleared successfully',
|
||||
'clear_fail' => 'Log clear failed',
|
||||
'export_success' => 'Log exported successfully',
|
||||
'export_fail' => 'Log export failed',
|
||||
'type' => [
|
||||
'add' => 'Add',
|
||||
'edit' => 'Edit',
|
||||
'delete' => 'Delete',
|
||||
'login' => 'Login',
|
||||
'logout' => 'Logout',
|
||||
'upload' => 'Upload',
|
||||
'download' => 'Download',
|
||||
],
|
||||
'result' => [
|
||||
'success' => 'Success',
|
||||
'fail' => 'Fail',
|
||||
],
|
||||
],
|
||||
|
||||
// Login Log
|
||||
'login_log' => [
|
||||
'title' => 'Login Log',
|
||||
'not_exist' => 'Log does not exist',
|
||||
'clear_success' => 'Log cleared successfully',
|
||||
'clear_fail' => 'Log clear failed',
|
||||
'export_success' => 'Log exported successfully',
|
||||
'export_fail' => 'Log export failed',
|
||||
'status' => [
|
||||
'success' => 'Success',
|
||||
'fail' => 'Fail',
|
||||
],
|
||||
'type' => [
|
||||
'web' => 'Web Login',
|
||||
'mobile' => 'Mobile Login',
|
||||
'api' => 'API Login',
|
||||
'third_party' => 'Third Party Login',
|
||||
],
|
||||
],
|
||||
|
||||
// Crontab Task
|
||||
'crontab' => [
|
||||
'title' => 'Crontab Task',
|
||||
'not_exist' => 'Task does not exist',
|
||||
'create_success' => 'Task created successfully',
|
||||
'create_fail' => 'Task creation failed',
|
||||
'update_success' => 'Task updated successfully',
|
||||
'update_fail' => 'Task update failed',
|
||||
'delete_success' => 'Task deleted successfully',
|
||||
'delete_fail' => 'Task deletion failed',
|
||||
'start_success' => 'Task started successfully',
|
||||
'start_fail' => 'Task start failed',
|
||||
'stop_success' => 'Task stopped successfully',
|
||||
'stop_fail' => 'Task stop failed',
|
||||
'run_success' => 'Task executed successfully',
|
||||
'run_fail' => 'Task execution failed',
|
||||
'status' => [
|
||||
'enabled' => 'Enabled',
|
||||
'disabled' => 'Disabled',
|
||||
'running' => 'Running',
|
||||
],
|
||||
'type' => [
|
||||
'command' => 'Command',
|
||||
'callback' => 'Callback',
|
||||
'url' => 'URL Request',
|
||||
],
|
||||
'log' => [
|
||||
'title' => 'Task Log',
|
||||
'not_exist' => 'Log does not exist',
|
||||
'clear_success' => 'Log cleared successfully',
|
||||
'clear_fail' => 'Log clear failed',
|
||||
],
|
||||
],
|
||||
// Message Management
|
||||
'message' => [
|
||||
'title' => 'Message Management',
|
||||
'not_exist' => 'Message does not exist',
|
||||
'create_success' => 'Message created successfully',
|
||||
'create_fail' => 'Message creation failed',
|
||||
'update_success' => 'Message updated successfully',
|
||||
'update_fail' => 'Message update failed',
|
||||
'delete_success' => 'Message deleted successfully',
|
||||
'delete_fail' => 'Message deletion failed',
|
||||
'send_success' => 'Message sent successfully',
|
||||
'send_fail' => 'Message sending failed',
|
||||
'read_success' => 'Message marked as read',
|
||||
'type' => [
|
||||
'system' => 'System Message',
|
||||
'notification' => 'Notification',
|
||||
'private' => 'Private Message',
|
||||
],
|
||||
'status' => [
|
||||
'unread' => 'Unread',
|
||||
'read' => 'Read',
|
||||
'deleted' => 'Deleted',
|
||||
],
|
||||
],
|
||||
|
||||
// Notification Management
|
||||
'notification' => [
|
||||
'title' => 'Notification Management',
|
||||
'not_exist' => 'Notification does not exist',
|
||||
'create_success' => 'Notification created successfully',
|
||||
'create_fail' => 'Notification creation failed',
|
||||
'update_success' => 'Notification updated successfully',
|
||||
'update_fail' => 'Notification update failed',
|
||||
'delete_success' => 'Notification deleted successfully',
|
||||
'delete_fail' => 'Notification deletion failed',
|
||||
'publish_success' => 'Notification published successfully',
|
||||
'publish_fail' => 'Notification publishing failed',
|
||||
'type' => [
|
||||
'system' => 'System Notification',
|
||||
'announcement' => 'Announcement',
|
||||
'reminder' => 'Reminder',
|
||||
],
|
||||
'status' => [
|
||||
'draft' => 'Draft',
|
||||
'published' => 'Published',
|
||||
'expired' => 'Expired',
|
||||
],
|
||||
],
|
||||
|
||||
// Attachment Management
|
||||
'attachment' => [
|
||||
'title' => 'Attachment Management',
|
||||
'not_exist' => 'Attachment does not exist',
|
||||
'upload_success' => 'Attachment uploaded successfully',
|
||||
'upload_fail' => 'Attachment upload failed',
|
||||
'download_success' => 'Attachment downloaded successfully',
|
||||
'download_fail' => 'Attachment download failed',
|
||||
'delete_success' => 'Attachment deleted successfully',
|
||||
'delete_fail' => 'Attachment deletion failed',
|
||||
'type' => [
|
||||
'image' => 'Image',
|
||||
'document' => 'Document',
|
||||
'video' => 'Video',
|
||||
'audio' => 'Audio',
|
||||
'other' => 'Other',
|
||||
],
|
||||
'size_exceed' => 'File size exceeds limit',
|
||||
'type_not_allowed' => 'File type not allowed',
|
||||
],
|
||||
'plugin' => [
|
||||
'error' => [
|
||||
'repeat_install' => 'Plugin is already installed...',
|
||||
'not_uninstall' => 'Plugin is not installed...',
|
||||
'info_file_not_exist' => 'Plugin info.json file not found',
|
||||
'dependency_missing' => 'Dependency plugin :name is missing',
|
||||
'config_invalid' => 'Plugin config file is invalid',
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
/**
|
||||
* @link https://raw.githubusercontent.com/laravel/framework/refs/heads/11.x/src/Illuminate/Translation/lang/en/validation.php
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => 'The :attribute field must be accepted.',
|
||||
'accepted_if' => 'The :attribute field must be accepted when :other is :value.',
|
||||
'active_url' => 'The :attribute field must be a valid URL.',
|
||||
'after' => 'The :attribute field must be a date after :date.',
|
||||
'after_or_equal' => 'The :attribute field must be a date after or equal to :date.',
|
||||
'alpha' => 'The :attribute field must only contain letters.',
|
||||
'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.',
|
||||
'alpha_num' => 'The :attribute field must only contain letters and numbers.',
|
||||
'array' => 'The :attribute field must be an array.',
|
||||
'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
|
||||
'before' => 'The :attribute field must be a date before :date.',
|
||||
'before_or_equal' => 'The :attribute field must be a date before or equal to :date.',
|
||||
'between' => [
|
||||
'array' => 'The :attribute field must have between :min and :max items.',
|
||||
'file' => 'The :attribute field must be between :min and :max kilobytes.',
|
||||
'numeric' => 'The :attribute field must be between :min and :max.',
|
||||
'string' => 'The :attribute field must be between :min and :max characters.',
|
||||
],
|
||||
'boolean' => 'The :attribute field must be true or false.',
|
||||
'can' => 'The :attribute field contains an unauthorized value.',
|
||||
'confirmed' => 'The :attribute field confirmation does not match.',
|
||||
'contains' => 'The :attribute field is missing a required value.',
|
||||
'current_password' => 'The password is incorrect.',
|
||||
'date' => 'The :attribute field must be a valid date.',
|
||||
'date_equals' => 'The :attribute field must be a date equal to :date.',
|
||||
'date_format' => 'The :attribute field must match the format :format.',
|
||||
'decimal' => 'The :attribute field must have :decimal decimal places.',
|
||||
'declined' => 'The :attribute field must be declined.',
|
||||
'declined_if' => 'The :attribute field must be declined when :other is :value.',
|
||||
'different' => 'The :attribute field and :other must be different.',
|
||||
'digits' => 'The :attribute field must be :digits digits.',
|
||||
'digits_between' => 'The :attribute field must be between :min and :max digits.',
|
||||
'dimensions' => 'The :attribute field has invalid image dimensions.',
|
||||
'distinct' => 'The :attribute field has a duplicate value.',
|
||||
'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
|
||||
'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
|
||||
'email' => 'The :attribute field must be a valid email address.',
|
||||
'ends_with' => 'The :attribute field must end with one of the following: :values.',
|
||||
'enum' => 'The selected :attribute is invalid.',
|
||||
'exists' => 'The selected :attribute is invalid.',
|
||||
'extensions' => 'The :attribute field must have one of the following extensions: :values.',
|
||||
'file' => 'The :attribute field must be a file.',
|
||||
'filled' => 'The :attribute field must have a value.',
|
||||
'gt' => [
|
||||
'array' => 'The :attribute field must have more than :value items.',
|
||||
'file' => 'The :attribute field must be greater than :value kilobytes.',
|
||||
'numeric' => 'The :attribute field must be greater than :value.',
|
||||
'string' => 'The :attribute field must be greater than :value characters.',
|
||||
],
|
||||
'gte' => [
|
||||
'array' => 'The :attribute field must have :value items or more.',
|
||||
'file' => 'The :attribute field must be greater than or equal to :value kilobytes.',
|
||||
'numeric' => 'The :attribute field must be greater than or equal to :value.',
|
||||
'string' => 'The :attribute field must be greater than or equal to :value characters.',
|
||||
],
|
||||
'hex_color' => 'The :attribute field must be a valid hexadecimal color.',
|
||||
'image' => 'The :attribute field must be an image.',
|
||||
'in' => 'The selected :attribute is invalid.',
|
||||
'in_array' => 'The :attribute field must exist in :other.',
|
||||
'integer' => 'The :attribute field must be an integer.',
|
||||
'ip' => 'The :attribute field must be a valid IP address.',
|
||||
'ipv4' => 'The :attribute field must be a valid IPv4 address.',
|
||||
'ipv6' => 'The :attribute field must be a valid IPv6 address.',
|
||||
'json' => 'The :attribute field must be a valid JSON string.',
|
||||
'list' => 'The :attribute field must be a list.',
|
||||
'lowercase' => 'The :attribute field must be lowercase.',
|
||||
'lt' => [
|
||||
'array' => 'The :attribute field must have less than :value items.',
|
||||
'file' => 'The :attribute field must be less than :value kilobytes.',
|
||||
'numeric' => 'The :attribute field must be less than :value.',
|
||||
'string' => 'The :attribute field must be less than :value characters.',
|
||||
],
|
||||
'lte' => [
|
||||
'array' => 'The :attribute field must not have more than :value items.',
|
||||
'file' => 'The :attribute field must be less than or equal to :value kilobytes.',
|
||||
'numeric' => 'The :attribute field must be less than or equal to :value.',
|
||||
'string' => 'The :attribute field must be less than or equal to :value characters.',
|
||||
],
|
||||
'mac_address' => 'The :attribute field must be a valid MAC address.',
|
||||
'max' => [
|
||||
'array' => 'The :attribute field must not have more than :max items.',
|
||||
'file' => 'The :attribute field must not be greater than :max kilobytes.',
|
||||
'numeric' => 'The :attribute field must not be greater than :max.',
|
||||
'string' => 'The :attribute field must not be greater than :max characters.',
|
||||
],
|
||||
'max_digits' => 'The :attribute field must not have more than :max digits.',
|
||||
'mimes' => 'The :attribute field must be a file of type: :values.',
|
||||
'mimetypes' => 'The :attribute field must be a file of type: :values.',
|
||||
'min' => [
|
||||
'array' => 'The :attribute field must have at least :min items.',
|
||||
'file' => 'The :attribute field must be at least :min kilobytes.',
|
||||
'numeric' => 'The :attribute field must be at least :min.',
|
||||
'string' => 'The :attribute field must be at least :min characters.',
|
||||
],
|
||||
'min_digits' => 'The :attribute field must have at least :min digits.',
|
||||
'missing' => 'The :attribute field must be missing.',
|
||||
'missing_if' => 'The :attribute field must be missing when :other is :value.',
|
||||
'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
|
||||
'missing_with' => 'The :attribute field must be missing when :values is present.',
|
||||
'missing_with_all' => 'The :attribute field must be missing when :values are present.',
|
||||
'multiple_of' => 'The :attribute field must be a multiple of :value.',
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'not_regex' => 'The :attribute field format is invalid.',
|
||||
'numeric' => 'The :attribute field must be a number.',
|
||||
'password' => [
|
||||
'letters' => 'The :attribute field must contain at least one letter.',
|
||||
'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
|
||||
'numbers' => 'The :attribute field must contain at least one number.',
|
||||
'symbols' => 'The :attribute field must contain at least one symbol.',
|
||||
'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
|
||||
],
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'present_if' => 'The :attribute field must be present when :other is :value.',
|
||||
'present_unless' => 'The :attribute field must be present unless :other is :value.',
|
||||
'present_with' => 'The :attribute field must be present when :values is present.',
|
||||
'present_with_all' => 'The :attribute field must be present when :values are present.',
|
||||
'prohibited' => 'The :attribute field is prohibited.',
|
||||
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
|
||||
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
|
||||
'prohibits' => 'The :attribute field prohibits :other from being present.',
|
||||
'regex' => 'The :attribute field format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
|
||||
'required_if_declined' => 'The :attribute field is required when :other is declined.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => 'The :attribute field is required when :values is present.',
|
||||
'required_with_all' => 'The :attribute field is required when :values are present.',
|
||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||
'same' => 'The :attribute field must match :other.',
|
||||
'size' => [
|
||||
'array' => 'The :attribute field must contain :size items.',
|
||||
'file' => 'The :attribute field must be :size kilobytes.',
|
||||
'numeric' => 'The :attribute field must be :size.',
|
||||
'string' => 'The :attribute field must be :size characters.',
|
||||
],
|
||||
'starts_with' => 'The :attribute field must start with one of the following: :values.',
|
||||
'string' => 'The :attribute field must be a string.',
|
||||
'timezone' => 'The :attribute field must be a valid timezone.',
|
||||
'unique' => 'The :attribute has already been taken.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'uppercase' => 'The :attribute field must be uppercase.',
|
||||
'url' => 'The :attribute field must be a valid URL.',
|
||||
'ulid' => 'The :attribute field must be a valid ULID.',
|
||||
'uuid' => 'The :attribute field must be a valid UUID.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap our attribute placeholder
|
||||
| with something more reader friendly such as "E-Mail Address" instead
|
||||
| of "email". This simply helps us make our message more expressive.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
|
||||
];
|
||||
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
// 操作反馈(成功/失败/确认)
|
||||
'operation' => [
|
||||
'success' => '成功',
|
||||
'fail' => '失败',
|
||||
'save' => [
|
||||
'success' => '保存成功',
|
||||
'fail' => '保存失败',
|
||||
'confirm' => '确认保存吗?',
|
||||
],
|
||||
'delete' => [
|
||||
'success' => '删除成功',
|
||||
'fail' => '删除失败',
|
||||
'confirm' => '确认删除吗?',
|
||||
],
|
||||
'update' => [
|
||||
'success' => '更新成功',
|
||||
'fail' => '更新失败',
|
||||
],
|
||||
'submit' => [
|
||||
'success' => '提交成功',
|
||||
'fail' => '提交失败',
|
||||
'confirm' => '确认提交吗?',
|
||||
],
|
||||
'upload' => [
|
||||
'success' => '上传成功',
|
||||
'fail' => '上传失败',
|
||||
'too_large' => '文件过大',
|
||||
'invalid_type' => '无效文件类型',
|
||||
],
|
||||
'download' => [
|
||||
'success' => '下载成功',
|
||||
'fail' => '下载失败',
|
||||
],
|
||||
],
|
||||
|
||||
// 通用交互动作(按钮/导航/数据操作)
|
||||
'action' => [
|
||||
'confirm' => '确认',
|
||||
'ensure' => '确保',
|
||||
'yes' => '是',
|
||||
'ok' => '确定',
|
||||
'no' => '否',
|
||||
'cancel' => '取消',
|
||||
'abort' => '中止',
|
||||
'back' => '返回',
|
||||
'return' => '返回上一页',
|
||||
'next' => '下一步',
|
||||
'continue' => '继续',
|
||||
'previous' => '上一步',
|
||||
'home' => '首页',
|
||||
'save' => '保存',
|
||||
'store' => '存储',
|
||||
'edit' => '编辑',
|
||||
'modify' => '修改',
|
||||
'update' => '更新',
|
||||
'refresh' => '刷新',
|
||||
'reset' => '重置',
|
||||
'clear' => '清除',
|
||||
'add' => '添加',
|
||||
'create' => '创建',
|
||||
'delete' => '删除',
|
||||
'remove' => '移除',
|
||||
'view' => '查看',
|
||||
'detail' => '详情',
|
||||
'search' => '搜索',
|
||||
'filter' => '筛选',
|
||||
'import' => '导入',
|
||||
'export' => '导出',
|
||||
'print' => '打印',
|
||||
'help' => '帮助',
|
||||
'settings' => '设置',
|
||||
'close' => '关闭',
|
||||
'exit' => '退出',
|
||||
],
|
||||
|
||||
// 状态提示(加载/错误/成功等)
|
||||
'status' => [
|
||||
'loading' => '加载中...',
|
||||
'processing' => '处理中...',
|
||||
'please_wait' => '请稍候...',
|
||||
'success' => '成功',
|
||||
'completed' => '已完成',
|
||||
'failure' => '失败',
|
||||
'fail' => '已失败',
|
||||
'error' => '错误',
|
||||
'warning' => '警告',
|
||||
'info' => '信息',
|
||||
'no_data' => '暂无数据',
|
||||
'permission_denied' => '权限不足',
|
||||
'login_expired' => '登录已过期',
|
||||
'network_error' => '网络连接错误', // 原网络错误(泛化)
|
||||
'server_error' => '内部服务器错误', // 原服务器错误(泛化)
|
||||
'request_timeout' => '请求超时', // 原请求超时(泛化)
|
||||
],
|
||||
|
||||
// 网络异常(HTTP 状态码 + 具体网络错误)
|
||||
'http' => [
|
||||
// 状态码(语义化键名 + 数字键名双映射)
|
||||
'bad_request_400' => '错误请求',
|
||||
'400' => '错误请求',
|
||||
'unauthorized_401' => '未授权',
|
||||
'401' => '未授权',
|
||||
'forbidden_403' => '禁止访问',
|
||||
'403' => '禁止访问',
|
||||
'not_found_404' => '页面未找到',
|
||||
'404' => '页面未找到',
|
||||
'method_not_allowed_405' => '方法不被允许',
|
||||
'405' => '方法不被允许',
|
||||
'request_timeout_408' => '请求超时',
|
||||
'408' => '请求超时',
|
||||
'too_many_requests_429' => '请求过于频繁',
|
||||
'429' => '请求过于频繁',
|
||||
'internal_server_error_500' => '服务器内部错误',
|
||||
'500' => '服务器内部错误',
|
||||
'bad_gateway_502' => '网关错误',
|
||||
'502' => '网关错误',
|
||||
'service_unavailable_503' => '服务不可用',
|
||||
'503' => '服务不可用',
|
||||
'gateway_timeout_504' => '网关超时',
|
||||
'504' => '网关超时',
|
||||
|
||||
// 网络异常描述(非状态码)
|
||||
'connection_refused' => '连接被拒绝',
|
||||
'dns_lookup_failed' => 'DNS 解析失败',
|
||||
'ssl_handshake_failed' => 'SSL 握手失败',
|
||||
'resource_unavailable' => '资源暂时不可用',
|
||||
],
|
||||
|
||||
// 基础界面元素(通用名词)
|
||||
'ui' => [
|
||||
'dashboard' => '仪表盘',
|
||||
'profile' => '个人资料',
|
||||
'account' => '账户',
|
||||
'notification' => '通知',
|
||||
'message' => '消息',
|
||||
'log' => '日志',
|
||||
'history' => '历史记录',
|
||||
'about' => '关于',
|
||||
'contact' => '联系我们',
|
||||
'language' => '语言',
|
||||
'theme' => '主题',
|
||||
'version' => '版本',
|
||||
'copyright' => '版权所有',
|
||||
],
|
||||
|
||||
//插件管理
|
||||
'plugin' => [
|
||||
'error' => [
|
||||
'repeat_install' => '插件已安装,不能重复安装', // 对应英文:Plugin is already installed...
|
||||
'not_uninstall' => '当前插件未安装,不能进行卸载操作', // 对应英文:Plugin is not installed...
|
||||
'info_file_not_exist' => '未找到:name插件的info.json文件', // 对应英文:Plugin info.json file not found
|
||||
'dependency_missing' => '缺少依赖插件::name', // 补充:依赖插件缺失
|
||||
'config_invalid' => '插件配置文件无效', // 补充:配置文件无效
|
||||
'dir_not_exist' => ':name插件目录不存在',
|
||||
'version_not_support' => ':name插件不支持当前框架版本',
|
||||
'sql_fail' => '插件数据库操作失败',
|
||||
'not_uninstall_delete' => ':name插件未卸载不能进行删除操作',
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* 菜单翻译
|
||||
*/
|
||||
return [
|
||||
//首页
|
||||
'首页' => '首页',
|
||||
'工作台' => '工作台',
|
||||
'分析页' => '分析页',
|
||||
|
||||
//公共
|
||||
'编辑' => '编辑',
|
||||
'新增' => '新增',
|
||||
'删除' => '删除',
|
||||
'详情' => '详情',
|
||||
'导出' => '导出',
|
||||
|
||||
//系统设置
|
||||
'用户' => '用户',
|
||||
'菜单管理' => '菜单管理',
|
||||
'职位管理' => '职位管理',
|
||||
'字典项列表' => '字典项列表',
|
||||
'字典项添加' => '字典项添加',
|
||||
'字典项删除' => '字典项删除',
|
||||
'字典项编辑' => '字典项编辑',
|
||||
'数据中心' => '数据中心',
|
||||
'角色管理' => '角色管理',
|
||||
'部门管理' => '部门管理',
|
||||
'登录日志' => '登录日志',
|
||||
'冻结用户' => '冻结用户',
|
||||
'取消冻结' => '取消冻结',
|
||||
'通知公告' => '通知公告',
|
||||
'数据回收' => '数据回收',
|
||||
'数据字典' => '数据字典',
|
||||
'授权' => '授权',
|
||||
'授权角色' => '授权角色',
|
||||
'系统监控' => '系统监控',
|
||||
'系统参数' => '系统参数',
|
||||
'系统设置' => '系统设置',
|
||||
'用户管理' => '用户管理',
|
||||
'移除用户' => '移除用户',
|
||||
'附件管理' => '附件管理',
|
||||
|
||||
//系统监控
|
||||
'性能监控' => '性能监控',
|
||||
'Redis监控' => 'Redis监控',
|
||||
'操作日志' => '操作日志',
|
||||
|
||||
//系统工具
|
||||
'系统工具' => '系统工具',
|
||||
|
||||
//业务流程
|
||||
'业务流程' => '业务流程',
|
||||
'流程查询' => '流程查询',
|
||||
'流程设置' => '流程设置',
|
||||
'流程设计' => '流程设计',
|
||||
'表单设计' => '表单设计',
|
||||
'基础功能' => '基础功能',
|
||||
'流程类型' => '流程类型',
|
||||
'委托设置' => '委托设置',
|
||||
'流程定义' => '流程定义',
|
||||
'我的申请' => '我的申请',
|
||||
'我的收藏' => '我的收藏',
|
||||
'我的已办' => '我的已办',
|
||||
'待阅' => '待阅',
|
||||
'待办' => '待办',
|
||||
'发起' => '发起',
|
||||
'恢复' => '恢复',
|
||||
//开发平台
|
||||
'开发平台' => '开发平台',
|
||||
'代码生成' => '代码生成',
|
||||
'定时任务' => '定时任务',
|
||||
'网关管理' => '网关管理',
|
||||
'限流规则' => '限流规则',
|
||||
'限访名单' => '限访名单',
|
||||
'在线开发' => '在线开发',
|
||||
//平台管理
|
||||
'平台管理' => '平台管理',
|
||||
'账套管理' => '账套管理',
|
||||
'账套中心' => '账套中心',
|
||||
'多数据源' => '多数据源',
|
||||
|
||||
//人工智能
|
||||
'人工智能' => '人工智能',
|
||||
'智能问答' => '智能问答',
|
||||
|
||||
];
|
||||
@@ -0,0 +1,320 @@
|
||||
<?php
|
||||
/**
|
||||
*+------------------
|
||||
* madong - 系统默认语言包
|
||||
*+------------------
|
||||
* Copyright (c) https://gitee.com/motion-code All rights reserved.
|
||||
*+------------------
|
||||
* Author: Mr. April (405784684@qq.com)
|
||||
*+------------------
|
||||
* Official Website: https://madong.tech
|
||||
*/
|
||||
|
||||
return [
|
||||
// 用户管理
|
||||
'user' => [
|
||||
'title' => '用户管理',
|
||||
'not_exist' => '用户不存在',
|
||||
'create_success' => '用户创建成功',
|
||||
'create_fail' => '用户创建失败',
|
||||
'update_success' => '用户更新成功',
|
||||
'update_fail' => '用户更新失败',
|
||||
'delete_success' => '用户删除成功',
|
||||
'delete_fail' => '用户删除失败',
|
||||
'enable_success' => '用户启用成功',
|
||||
'enable_fail' => '用户启用失败',
|
||||
'disable_success' => '用户禁用成功',
|
||||
'disable_fail' => '用户禁用失败',
|
||||
'lock_success' => '用户锁定成功',
|
||||
'lock_fail' => '用户锁定失败',
|
||||
'unlock_success' => '用户解锁成功',
|
||||
'unlock_fail' => '用户解锁失败',
|
||||
'password_reset_success' => '密码重置成功',
|
||||
'password_reset_fail' => '密码重置失败',
|
||||
'username_exist' => '用户名已存在',
|
||||
'email_exist' => '邮箱已存在',
|
||||
'mobile_exist' => '手机号已存在',
|
||||
'admin_not_editable' => '超级管理员不可编辑',
|
||||
'admin_not_deletable' => '超级管理员不可删除',
|
||||
],
|
||||
|
||||
// 角色管理
|
||||
'role' => [
|
||||
'title' => '角色管理',
|
||||
'not_exist' => '角色不存在',
|
||||
'create_success' => '角色创建成功',
|
||||
'create_fail' => '角色创建失败',
|
||||
'update_success' => '角色更新成功',
|
||||
'update_fail' => '角色更新失败',
|
||||
'delete_success' => '角色删除成功',
|
||||
'delete_fail' => '角色删除失败',
|
||||
'assign_success' => '角色分配成功',
|
||||
'assign_fail' => '角色分配失败',
|
||||
'admin_role_not_editable' => '管理员角色不可编辑',
|
||||
'admin_role_not_deletable' => '管理员角色不可删除',
|
||||
'in_use' => '角色正在使用中,不可删除',
|
||||
'permission' => [
|
||||
'assign_success' => '权限分配成功',
|
||||
'assign_fail' => '权限分配失败',
|
||||
'update_success' => '权限更新成功',
|
||||
'update_fail' => '权限更新失败',
|
||||
],
|
||||
],
|
||||
|
||||
// 菜单管理
|
||||
'menu' => [
|
||||
'title' => '菜单管理',
|
||||
'not_exist' => '菜单不存在',
|
||||
'create_success' => '菜单创建成功',
|
||||
'create_fail' => '菜单创建失败',
|
||||
'update_success' => '菜单更新成功',
|
||||
'update_fail' => '菜单更新失败',
|
||||
'delete_success' => '菜单删除成功',
|
||||
'delete_fail' => '菜单删除失败',
|
||||
'move_success' => '菜单移动成功',
|
||||
'move_fail' => '菜单移动失败',
|
||||
'has_children' => '存在子菜单,不可删除',
|
||||
'type' => [
|
||||
'directory' => '目录',
|
||||
'menu' => '菜单',
|
||||
'button' => '按钮',
|
||||
],
|
||||
'status' => [
|
||||
'enabled' => '启用',
|
||||
'disabled' => '禁用',
|
||||
],
|
||||
],
|
||||
|
||||
// 数据字典
|
||||
'dict' => [
|
||||
'title' => '数据字典',
|
||||
'not_exist' => '字典不存在',
|
||||
'create_success' => '字典创建成功',
|
||||
'create_fail' => '字典创建失败',
|
||||
'update_success' => '字典更新成功',
|
||||
'update_fail' => '字典更新失败',
|
||||
'delete_success' => '字典删除成功',
|
||||
'delete_fail' => '字典删除失败',
|
||||
'item' => [
|
||||
'not_exist' => '字典项不存在',
|
||||
'create_success' => '字典项创建成功',
|
||||
'create_fail' => '字典项创建失败',
|
||||
'update_success' => '字典项更新成功',
|
||||
'update_fail' => '字典项更新失败',
|
||||
'delete_success' => '字典项删除成功',
|
||||
'delete_fail' => '字典项删除失败',
|
||||
],
|
||||
],
|
||||
|
||||
// 部门管理
|
||||
'dept' => [
|
||||
'title' => '部门管理',
|
||||
'not_exist' => '部门不存在',
|
||||
'create_success' => '部门创建成功',
|
||||
'create_fail' => '部门创建失败',
|
||||
'update_success' => '部门更新成功',
|
||||
'update_fail' => '部门更新失败',
|
||||
'delete_success' => '部门删除成功',
|
||||
'delete_fail' => '部门删除失败',
|
||||
'has_children' => '存在子部门,不可删除',
|
||||
'has_users' => '部门下存在用户,不可删除',
|
||||
],
|
||||
|
||||
// 职位管理
|
||||
'post' => [
|
||||
'title' => '职位管理',
|
||||
'not_exist' => '职位不存在',
|
||||
'create_success' => '职位创建成功',
|
||||
'create_fail' => '职位创建失败',
|
||||
'update_success' => '职位更新成功',
|
||||
'update_fail' => '职位更新失败',
|
||||
'delete_success' => '职位删除成功',
|
||||
'delete_fail' => '职位删除失败',
|
||||
'has_users' => '职位下存在用户,不可删除',
|
||||
],
|
||||
|
||||
// 系统参数
|
||||
'config' => [
|
||||
'title' => '系统参数',
|
||||
'not_exist' => '参数不存在',
|
||||
'update_success' => '参数更新成功',
|
||||
'update_fail' => '参数更新失败',
|
||||
'group' => [
|
||||
'system' => '系统设置',
|
||||
'security' => '安全设置',
|
||||
'mail' => '邮件设置',
|
||||
'sms' => '短信设置',
|
||||
'storage' => '存储设置',
|
||||
],
|
||||
'cache_cleared' => '配置缓存已清除',
|
||||
],
|
||||
|
||||
// 数据回收
|
||||
'recycle' => [
|
||||
'title' => '数据回收',
|
||||
'not_exist' => '回收项不存在',
|
||||
'recycle_success' => '数据回收成功',
|
||||
'recycle_fail' => '数据回收失败',
|
||||
'restore_success' => '数据恢复成功',
|
||||
'restore_fail' => '数据恢复失败',
|
||||
'delete_success' => '数据永久删除成功',
|
||||
'delete_fail' => '数据永久删除失败',
|
||||
'empty_success' => '回收站清空成功',
|
||||
'empty_fail' => '回收站清空失败',
|
||||
'type' => [
|
||||
'user' => '用户',
|
||||
'role' => '角色',
|
||||
'menu' => '菜单',
|
||||
'dept' => '部门',
|
||||
'post' => '职位',
|
||||
'dict' => '字典',
|
||||
'attachment' => '附件',
|
||||
],
|
||||
],
|
||||
|
||||
// 操作日志
|
||||
'operate_log' => [
|
||||
'title' => '操作日志',
|
||||
'not_exist' => '日志不存在',
|
||||
'clear_success' => '日志清除成功',
|
||||
'clear_fail' => '日志清除失败',
|
||||
'export_success' => '日志导出成功',
|
||||
'export_fail' => '日志导出失败',
|
||||
'type' => [
|
||||
'add' => '新增',
|
||||
'edit' => '编辑',
|
||||
'delete' => '删除',
|
||||
'login' => '登录',
|
||||
'logout' => '退出',
|
||||
'upload' => '上传',
|
||||
'download' => '下载',
|
||||
],
|
||||
'result' => [
|
||||
'success' => '成功',
|
||||
'fail' => '失败',
|
||||
],
|
||||
],
|
||||
|
||||
// 登录日志
|
||||
'login_log' => [
|
||||
'title' => '登录日志',
|
||||
'not_exist' => '日志不存在',
|
||||
'clear_success' => '日志清除成功',
|
||||
'clear_fail' => '日志清除失败',
|
||||
'export_success' => '日志导出成功',
|
||||
'export_fail' => '日志导出失败',
|
||||
'status' => [
|
||||
'success' => '成功',
|
||||
'fail' => '失败',
|
||||
],
|
||||
'type' => [
|
||||
'web' => '网页登录',
|
||||
'mobile' => '手机登录',
|
||||
'api' => 'API登录',
|
||||
'third_party' => '第三方登录',
|
||||
],
|
||||
],
|
||||
|
||||
// 定时任务
|
||||
'crontab' => [
|
||||
'title' => '定时任务',
|
||||
'not_exist' => '任务不存在',
|
||||
'create_success' => '任务创建成功',
|
||||
'create_fail' => '任务创建失败',
|
||||
'update_success' => '任务更新成功',
|
||||
'update_fail' => '任务更新失败',
|
||||
'delete_success' => '任务删除成功',
|
||||
'delete_fail' => '任务删除失败',
|
||||
'start_success' => '任务启动成功',
|
||||
'start_fail' => '任务启动失败',
|
||||
'stop_success' => '任务停止成功',
|
||||
'stop_fail' => '任务停止失败',
|
||||
'run_success' => '任务执行成功',
|
||||
'run_fail' => '任务执行失败',
|
||||
'status' => [
|
||||
'enabled' => '启用',
|
||||
'disabled' => '禁用',
|
||||
'running' => '运行中',
|
||||
],
|
||||
'type' => [
|
||||
'command' => '命令行',
|
||||
'callback' => '回调函数',
|
||||
'url' => 'URL请求',
|
||||
],
|
||||
'log' => [
|
||||
'title' => '任务日志',
|
||||
'not_exist' => '日志不存在',
|
||||
'clear_success' => '日志清除成功',
|
||||
'clear_fail' => '日志清除失败',
|
||||
],
|
||||
],
|
||||
// 消息管理
|
||||
'message' => [
|
||||
'title' => '消息管理',
|
||||
'not_exist' => '消息不存在',
|
||||
'create_success' => '消息创建成功',
|
||||
'create_fail' => '消息创建失败',
|
||||
'update_success' => '消息更新成功',
|
||||
'update_fail' => '消息更新失败',
|
||||
'delete_success' => '消息删除成功',
|
||||
'delete_fail' => '消息删除失败',
|
||||
'send_success' => '消息发送成功',
|
||||
'send_fail' => '消息发送失败',
|
||||
'read_success' => '消息已读',
|
||||
'type' => [
|
||||
'system' => '系统消息',
|
||||
'notification' => '通知消息',
|
||||
'private' => '私信',
|
||||
],
|
||||
'status' => [
|
||||
'unread' => '未读',
|
||||
'read' => '已读',
|
||||
'deleted' => '已删除',
|
||||
],
|
||||
],
|
||||
|
||||
// 通知管理
|
||||
'notification' => [
|
||||
'title' => '通知管理',
|
||||
'not_exist' => '通知不存在',
|
||||
'create_success' => '通知创建成功',
|
||||
'create_fail' => '通知创建失败',
|
||||
'update_success' => '通知更新成功',
|
||||
'update_fail' => '通知更新失败',
|
||||
'delete_success' => '通知删除成功',
|
||||
'delete_fail' => '通知删除失败',
|
||||
'publish_success' => '通知发布成功',
|
||||
'publish_fail' => '通知发布失败',
|
||||
'type' => [
|
||||
'system' => '系统通知',
|
||||
'announcement' => '公告',
|
||||
'reminder' => '提醒',
|
||||
],
|
||||
'status' => [
|
||||
'draft' => '草稿',
|
||||
'published' => '已发布',
|
||||
'expired' => '已过期',
|
||||
],
|
||||
],
|
||||
|
||||
// 附件管理
|
||||
'attachment' => [
|
||||
'title' => '附件管理',
|
||||
'not_exist' => '附件不存在',
|
||||
'upload_success' => '附件上传成功',
|
||||
'upload_fail' => '附件上传失败',
|
||||
'download_success' => '附件下载成功',
|
||||
'download_fail' => '附件下载失败',
|
||||
'delete_success' => '附件删除成功',
|
||||
'delete_fail' => '附件删除失败',
|
||||
'type' => [
|
||||
'image' => '图片',
|
||||
'document' => '文档',
|
||||
'video' => '视频',
|
||||
'audio' => '音频',
|
||||
'other' => '其他',
|
||||
],
|
||||
'size_exceed' => '文件大小超出限制',
|
||||
'type_not_allowed' => '文件类型不允许',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
/**
|
||||
* @link https://raw.githubusercontent.com/Laravel-Lang/lang/refs/heads/main/locales/zh_CN/php.json
|
||||
*/
|
||||
|
||||
return [
|
||||
'accepted' => '您必须接受 :attribute。',
|
||||
'accepted_if' => '当 :other 为 :value 时,必须接受 :attribute。',
|
||||
'active_url' => ':attribute 不是一个有效的网址。',
|
||||
'after' => ':attribute 必须要晚于 :date。',
|
||||
'after_or_equal' => ':attribute 必须要等于 :date 或更晚。',
|
||||
'alpha' => ':attribute 只能由字母组成。',
|
||||
'alpha_dash' => ':attribute 只能由字母、数字、短划线(-)和下划线(_)组成。',
|
||||
'alpha_num' => ':attribute 只能由字母和数字组成。',
|
||||
'array' => ':attribute 必须是一个数组。',
|
||||
'ascii' => ':attribute 必须仅包含单字节字母数字字符和符号。',
|
||||
'before' => ':attribute 必须要早于 :date。',
|
||||
'before_or_equal' => ':attribute 必须要等于 :date 或更早。',
|
||||
'between' => [
|
||||
'array' => ':attribute 必须只有 :min - :max 个单元。',
|
||||
'file' => ':attribute 必须介于 :min - :max KB 之间。',
|
||||
'numeric' => ':attribute 必须介于 :min - :max 之间。',
|
||||
'string' => ':attribute 必须介于 :min - :max 个字符之间。',
|
||||
],
|
||||
'boolean' => ':attribute 必须为布尔值。',
|
||||
'can' => ':attribute 字段包含未经授权的值。',
|
||||
'confirmed' => ':attribute 两次输入不一致。',
|
||||
'contains' => ':attribute 字段缺少必填值。',
|
||||
'current_password' => '密码错误。',
|
||||
'date' => ':attribute 不是一个有效的日期。',
|
||||
'date_equals' => ':attribute 必须要等于 :date。',
|
||||
'date_format' => ':attribute 的格式必须为 :format。',
|
||||
'decimal' => ':attribute 必须有 :decimal 位小数。',
|
||||
'declined' => ':attribute 必须是拒绝的。',
|
||||
'declined_if' => '当 :other 为 :value 时字段 :attribute 必须是拒绝的。',
|
||||
'different' => ':attribute 和 :other 必须不同。',
|
||||
'digits' => ':attribute 必须是 :digits 位数字。',
|
||||
'digits_between' => ':attribute 必须是介于 :min 和 :max 位的数字。',
|
||||
'dimensions' => ':attribute 图片尺寸不正确。',
|
||||
'distinct' => ':attribute 已经存在。',
|
||||
'doesnt_end_with' => ':attribute 不能以以下之一结尾: :values。',
|
||||
'doesnt_start_with' => ':attribute 不能以下列之一开头: :values。',
|
||||
'email' => ':attribute 不是一个合法的邮箱。',
|
||||
'ends_with' => ':attribute 必须以 :values 为结尾。',
|
||||
'enum' => ':attribute 值不正确。',
|
||||
'exists' => ':attribute 不存在。',
|
||||
'extensions' => ':attribute 字段必须具有以下扩展名之一::values。',
|
||||
'file' => ':attribute 必须是文件。',
|
||||
'filled' => ':attribute 不能为空。',
|
||||
'gt' => [
|
||||
'array' => ':attribute 必须多于 :value 个元素。',
|
||||
'file' => ':attribute 必须大于 :value KB。',
|
||||
'numeric' => ':attribute 必须大于 :value。',
|
||||
'string' => ':attribute 必须多于 :value 个字符。',
|
||||
],
|
||||
'gte' => [
|
||||
'array' => ':attribute 必须多于或等于 :value 个元素。',
|
||||
'file' => ':attribute 必须大于或等于 :value KB。',
|
||||
'numeric' => ':attribute 必须大于或等于 :value。',
|
||||
'string' => ':attribute 必须多于或等于 :value 个字符。',
|
||||
],
|
||||
'hex_color' => ':attribute 字段必须是有效的十六进制颜色。',
|
||||
'image' => ':attribute 必须是图片。',
|
||||
'in' => '已选的属性 :attribute 无效。',
|
||||
'in_array' => ':attribute 必须在 :other 中。',
|
||||
'integer' => ':attribute 必须是整数。',
|
||||
'ip' => ':attribute 必须是有效的 IP 地址。',
|
||||
'ipv4' => ':attribute 必须是有效的 IPv4 地址。',
|
||||
'ipv6' => ':attribute 必须是有效的 IPv6 地址。',
|
||||
'json' => ':attribute 必须是正确的 JSON 格式。',
|
||||
'list' => ':attribute 字段必须是一个列表。',
|
||||
'lowercase' => ':attribute 必须小写。',
|
||||
'lt' => [
|
||||
'array' => ':attribute 必须少于 :value 个元素。',
|
||||
'file' => ':attribute 必须小于 :value KB。',
|
||||
'numeric' => ':attribute 必须小于 :value。',
|
||||
'string' => ':attribute 必须少于 :value 个字符。',
|
||||
],
|
||||
'lte' => [
|
||||
'array' => ':attribute 必须少于或等于 :value 个元素。',
|
||||
'file' => ':attribute 必须小于或等于 :value KB。',
|
||||
'numeric' => ':attribute 必须小于或等于 :value。',
|
||||
'string' => ':attribute 必须少于或等于 :value 个字符。',
|
||||
],
|
||||
'mac_address' => ':attribute 必须是一个有效的 MAC 地址。',
|
||||
'max' => [
|
||||
'array' => ':attribute 最多只有 :max 个单元。',
|
||||
'file' => ':attribute 不能大于 :max KB。',
|
||||
'numeric' => ':attribute 不能大于 :max。',
|
||||
'string' => ':attribute 不能大于 :max 个字符。',
|
||||
],
|
||||
'max_digits' => ':attribute 不能超过 :max 位数。',
|
||||
'mimes' => ':attribute 必须是一个 :values 类型的文件。',
|
||||
'mimetypes' => ':attribute 必须是一个 :values 类型的文件。',
|
||||
'min' => [
|
||||
'array' => ':attribute 至少有 :min 个单元。',
|
||||
'file' => ':attribute 大小不能小于 :min KB。',
|
||||
'numeric' => ':attribute 必须大于等于 :min。',
|
||||
'string' => ':attribute 至少为 :min 个字符。',
|
||||
],
|
||||
'min_digits' => ':attribute 必须至少有 :min 位数。',
|
||||
'missing' => '必须缺少 :attribute 字段。',
|
||||
'missing_if' => '当 :other 为 :value 时,必须缺少 :attribute 字段。',
|
||||
'missing_unless' => '必须缺少 :attribute 字段,除非 :other 是 :value。',
|
||||
'missing_with' => '存在 :values 时,必须缺少 :attribute 字段。',
|
||||
'missing_with_all' => '存在 :values 时,必须缺少 :attribute 字段。',
|
||||
'multiple_of' => ':attribute 必须是 :value 中的多个值。',
|
||||
'not_in' => '已选的属性 :attribute 非法。',
|
||||
'not_regex' => ':attribute 的格式错误。',
|
||||
'numeric' => ':attribute 必须是一个数字。',
|
||||
'password' => [
|
||||
'letters' => ':attribute 必须至少包含一个字母。',
|
||||
'mixed' => ':attribute 必须至少包含一个大写字母和一个小写字母。',
|
||||
'numbers' => ':attribute 必须至少包含一个数字。',
|
||||
'symbols' => ':attribute 必须至少包含一个符号。',
|
||||
'uncompromised' => '给定的 :attribute 出现在已经泄漏的密码中。请选择不同的 :attribute。',
|
||||
],
|
||||
'present' => ':attribute 必须存在。',
|
||||
'present_if' => '当 :other 等于 :value 时,必须存在 :attribute 字段。',
|
||||
'present_unless' => '除非 :other 等于 :value,否则 :attribute 字段必须存在。',
|
||||
'present_with' => '当 :values 存在时,:attribute 字段必须存在。',
|
||||
'present_with_all' => '当存在 :values 时,必须存在 :attribute 字段。',
|
||||
'prohibited' => ':attribute 字段被禁止。',
|
||||
'prohibited_if' => '当 :other 为 :value 时,禁止 :attribute 字段。',
|
||||
'prohibited_unless' => ':attribute 字段被禁止,除非 :other 位于 :values 中。',
|
||||
'prohibits' => ':attribute 字段禁止出现 :other。',
|
||||
'regex' => ':attribute 格式不正确。',
|
||||
'required' => ':attribute 不能为空。',
|
||||
'required_array_keys' => ':attribute 至少包含指定的键::values.',
|
||||
'required_if' => '当 :other 为 :value 时 :attribute 不能为空。',
|
||||
'required_if_accepted' => '当 :other 存在时,:attribute 不能为空。',
|
||||
'required_if_declined' => '当 :other 不存在时,:attribute 不能为空。',
|
||||
'required_unless' => '当 :other 不为 :values 时 :attribute 不能为空。',
|
||||
'required_with' => '当 :values 存在时 :attribute 不能为空。',
|
||||
'required_with_all' => '当 :values 存在时 :attribute 不能为空。',
|
||||
'required_without' => '当 :values 不存在时 :attribute 不能为空。',
|
||||
'required_without_all' => '当 :values 都不存在时 :attribute 不能为空。',
|
||||
'same' => ':attribute 和 :other 必须相同。',
|
||||
'size' => [
|
||||
'array' => ':attribute 必须为 :size 个单元。',
|
||||
'file' => ':attribute 大小必须为 :size KB。',
|
||||
'numeric' => ':attribute 大小必须为 :size。',
|
||||
'string' => ':attribute 必须是 :size 个字符。',
|
||||
],
|
||||
'starts_with' => ':attribute 必须以 :values 为开头。',
|
||||
'string' => ':attribute 必须是一个字符串。',
|
||||
'timezone' => ':attribute 必须是一个合法的时区值。',
|
||||
'unique' => ':attribute 已经存在。',
|
||||
'uploaded' => ':attribute 上传失败。',
|
||||
'uppercase' => ':attribute 必须大写',
|
||||
'url' => ':attribute 格式不正确。',
|
||||
'ulid' => ':attribute 必须是有效的 ULID。',
|
||||
'uuid' => ':attribute 必须是有效的 UUID。',
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
'attributes' => [],
|
||||
];
|
||||
Reference in New Issue
Block a user