├── app
├── vuecmf
│ ├── common.php
│ ├── event.php
│ ├── middleware.php
│ └── controller
│ │ └── Index.php
├── Request.php
├── service.php
├── provider.php
├── middleware.php
├── event.php
├── AppService.php
├── controller
│ └── Index.php
├── ExceptionHandle.php
├── BaseController.php
└── common.php
├── view
└── README.md
├── extend
└── .gitignore
├── runtime
└── .gitignore
├── public
├── static
│ └── .gitignore
├── robots.txt
├── favicon.ico
├── .htaccess
├── router.php
└── index.php
├── route
└── app.php
├── .gitignore
├── .example.env
├── config
├── middleware.php
├── console.php
├── trace.php
├── session.php
├── cookie.php
├── tauthz-rbac-model.conf
├── filesystem.php
├── view.php
├── cache.php
├── lang.php
├── app.php
├── tauthz.php
├── log.php
├── route.php
└── database.php
├── think
├── .env
├── docker-compose.yml
├── Dockerfile
├── docker
└── nginx
│ └── default.conf
├── composer.json
├── LICENSE.txt
├── README.md
├── .travis.yml
├── database
└── migrations
│ ├── 20240406230620_create_rules_table.php
│ └── 20240406230630_vuecmf_database.php
└── LICENSE
/app/vuecmf/common.php:
--------------------------------------------------------------------------------
1 | [],
5 | ];
6 |
--------------------------------------------------------------------------------
/app/Request.php:
--------------------------------------------------------------------------------
1 | [],
6 | // 优先级设置,此数组中的中间件会按照数组中的顺序优先执行
7 | 'priority' => [],
8 | ];
9 |
--------------------------------------------------------------------------------
/app/vuecmf/middleware.php:
--------------------------------------------------------------------------------
1 | console->run();
--------------------------------------------------------------------------------
/app/provider.php:
--------------------------------------------------------------------------------
1 | Request::class,
8 | 'think\exception\Handle' => ExceptionHandle::class,
9 | ];
10 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | Options +FollowSymlinks -Multiviews
3 | RewriteEngine On
4 |
5 | RewriteCond %{REQUEST_FILENAME} !-d
6 | RewriteCond %{REQUEST_FILENAME} !-f
7 | RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
8 |
9 |
--------------------------------------------------------------------------------
/config/console.php:
--------------------------------------------------------------------------------
1 | [
8 | ],
9 | ];
10 |
--------------------------------------------------------------------------------
/app/middleware.php:
--------------------------------------------------------------------------------
1 | [
5 | ],
6 |
7 | 'listen' => [
8 | 'AppInit' => [],
9 | 'HttpRun' => [],
10 | 'HttpEnd' => [],
11 | 'LogLevel' => [],
12 | 'LogWrite' => [],
13 | ],
14 |
15 | 'subscribe' => [
16 | ],
17 | ];
18 |
--------------------------------------------------------------------------------
/config/trace.php:
--------------------------------------------------------------------------------
1 | 'Html',
8 | // 读取的日志通道名
9 | 'channel' => '',
10 | ];
11 |
--------------------------------------------------------------------------------
/app/AppService.php:
--------------------------------------------------------------------------------
1 | *{ padding: 0; margin: 0; }';
12 | }
13 |
14 | public function hello($name = 'ThinkPHP8')
15 | {
16 | return 'hello,' . $name;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/config/session.php:
--------------------------------------------------------------------------------
1 | 'PHPSESSID',
9 | // SESSION_ID的提交变量,解决flash上传跨域
10 | 'var_session_id' => '',
11 | // 驱动方式 支持file cache
12 | 'type' => 'file',
13 | // 存储连接标识 当type使用cache的时候有效
14 | 'store' => null,
15 | // 过期时间
16 | 'expire' => 1440,
17 | // 前缀
18 | 'prefix' => '',
19 | ];
20 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # 使用官方的PHP 8.1镜像作为基础镜像
2 | FROM php:8.1-fpm
3 |
4 | # 安装必要的扩展
5 | RUN apt-get update && apt-get install -y \
6 | libzip-dev \
7 | zip \
8 | unzip \
9 | && docker-php-ext-install pdo_mysql zip bcmath
10 |
11 | # 安装Composer
12 | RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
13 |
14 | # 设置工作目录
15 | WORKDIR /var/www/html
16 |
17 | # 复制项目文件到工作目录
18 | COPY . .
19 |
20 | # 安装项目依赖
21 | RUN composer install --no-dev --optimize-autoloader
22 |
23 | # 暴露9000端口
24 | EXPOSE 9000
25 |
26 | # 启动PHP-FPM
27 | CMD ["php-fpm"]
28 |
--------------------------------------------------------------------------------
/config/cookie.php:
--------------------------------------------------------------------------------
1 | 0,
8 | // cookie 保存路径
9 | 'path' => '/',
10 | // cookie 有效域名
11 | 'domain' => '',
12 | // cookie 启用安全传输
13 | 'secure' => false,
14 | // httponly设置
15 | 'httponly' => false,
16 | // 是否使用 setcookie
17 | 'setcookie' => true,
18 | // samesite 设置,支持 'strict' 'lax'
19 | 'samesite' => '',
20 | ];
21 |
--------------------------------------------------------------------------------
/docker/nginx/default.conf:
--------------------------------------------------------------------------------
1 | server {
2 | listen 80;
3 | server_name localhost;
4 |
5 | root /var/www/html/public;
6 | index index.php index.html index.htm;
7 |
8 | location / {
9 | if (!-e $request_filename) {
10 | rewrite ^(.*)$ /index.php?s=/$1 last;
11 | }
12 | }
13 |
14 | location ~ \.php$ {
15 | fastcgi_pass app:9000;
16 | fastcgi_index index.php;
17 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
18 | include fastcgi_params;
19 | }
20 |
21 | location ~ /\.ht {
22 | deny all;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/config/tauthz-rbac-model.conf:
--------------------------------------------------------------------------------
1 | #请求的校验参数定义,参数个数必须与验证时的传入的个数一致,对应数据表中 ptype=p 的 v0,v1,v2,v3 字段一一对应
2 | #例如 $res = Enforcer::enforce('lily', 'appname' , 'controller', 'action');
3 | [request_definition]
4 | r = sub, dom, obj, act
5 |
6 | #策略定义,对应数据表中 ptype=p 的 v0,v1,v2,v3 字段一一对应, 且数据表中对应的值不能为空
7 | [policy_definition]
8 | p = sub, dom, obj, act
9 |
10 | #分组和角色定义,对应数据表中 ptype=g, 且数据表对应的值不能为空
11 | [role_definition]
12 | g = _, _, _
13 |
14 | [policy_effect]
15 | e = some(where (p.eft == allow))
16 |
17 | #匹配规则,g代表分组或角色,括号里面的必须与数据表中 ptype=g的 v0, v1, v2 字段一一对应
18 | [matchers]
19 | m = g(r.sub, p.sub, r.dom) && r.dom == p.dom && r.obj == p.obj && r.act == p.act
--------------------------------------------------------------------------------
/config/filesystem.php:
--------------------------------------------------------------------------------
1 | 'local',
6 | // 磁盘列表
7 | 'disks' => [
8 | 'local' => [
9 | 'type' => 'local',
10 | 'root' => app()->getRuntimePath() . 'storage',
11 | ],
12 | 'public' => [
13 | // 磁盘类型
14 | 'type' => 'local',
15 | // 磁盘路径
16 | 'root' => app()->getRootPath() . 'public/storage',
17 | // 磁盘路径对应的外部URL路径
18 | 'url' => '/storage',
19 | // 可见性
20 | 'visibility' => 'public',
21 | ],
22 | // 更多的磁盘配置信息
23 | ],
24 | ];
25 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | 'Think',
9 | // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
10 | 'auto_rule' => 1,
11 | // 模板目录名
12 | 'view_dir_name' => 'view',
13 | // 模板后缀
14 | 'view_suffix' => 'html',
15 | // 模板文件名分隔符
16 | 'view_depr' => DIRECTORY_SEPARATOR,
17 | // 模板引擎普通标签开始标记
18 | 'tpl_begin' => '{',
19 | // 模板引擎普通标签结束标记
20 | 'tpl_end' => '}',
21 | // 标签库标签开始标记
22 | 'taglib_begin' => '{',
23 | // 标签库标签结束标记
24 | 'taglib_end' => '}',
25 | ];
26 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | 'file',
10 |
11 | // 缓存连接方式配置
12 | 'stores' => [
13 | 'file' => [
14 | // 驱动方式
15 | 'type' => 'File',
16 | // 缓存保存目录
17 | 'path' => '',
18 | // 缓存前缀
19 | 'prefix' => '',
20 | // 缓存有效期 0表示永久缓存
21 | 'expire' => 0,
22 | // 缓存标签前缀
23 | 'tag_prefix' => 'tag:',
24 | // 序列化机制 例如 ['serialize', 'unserialize']
25 | 'serialize' => [],
26 | ],
27 | // 更多的缓存连接
28 | ],
29 | ];
30 |
--------------------------------------------------------------------------------
/config/lang.php:
--------------------------------------------------------------------------------
1 | env('DEFAULT_LANG', 'zh-cn'),
9 | // 允许的语言列表
10 | 'allow_lang_list' => [],
11 | // 多语言自动侦测变量名
12 | 'detect_var' => 'lang',
13 | // 是否使用Cookie记录
14 | 'use_cookie' => true,
15 | // 多语言cookie变量
16 | 'cookie_var' => 'think_lang',
17 | // 多语言header变量
18 | 'header_var' => 'think-lang',
19 | // 扩展语言包
20 | 'extend_list' => [],
21 | // Accept-Language转义为对应语言包名称
22 | 'accept_language' => [
23 | 'zh-hans-cn' => 'zh-cn',
24 | ],
25 | // 是否支持语言分组
26 | 'allow_group' => false,
27 | ];
28 |
--------------------------------------------------------------------------------
/public/router.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | // $Id$
12 |
13 | if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
14 | return false;
15 | } else {
16 | $_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php';
17 |
18 | require __DIR__ . "/index.php";
19 | }
20 |
--------------------------------------------------------------------------------
/app/vuecmf/controller/Index.php:
--------------------------------------------------------------------------------
1 | *{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }
:)
Welcome to VueCMF V3
[ Powered by vuecmf ] ';
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // [ 应用入口文件 ]
13 | namespace think;
14 |
15 | require __DIR__ . '/../vendor/autoload.php';
16 |
17 | // 执行HTTP应用并响应
18 | $http = (new App())->http;
19 |
20 | $response = $http->run();
21 |
22 | $response->send();
23 |
24 | $http->end($response);
25 |
--------------------------------------------------------------------------------
/config/app.php:
--------------------------------------------------------------------------------
1 | env('APP_HOST', ''),
9 | // 应用的命名空间
10 | 'app_namespace' => '',
11 | // 是否启用路由
12 | 'with_route' => true,
13 | // 默认应用
14 | 'default_app' => 'index',
15 | // 默认时区
16 | 'default_timezone' => 'Asia/Shanghai',
17 |
18 | // 应用映射(自动多应用模式有效)
19 | 'app_map' => [],
20 | // 域名绑定(自动多应用模式有效)
21 | 'domain_bind' => [],
22 | // 禁止URL访问的应用列表(自动多应用模式有效)
23 | 'deny_app_list' => [],
24 |
25 | // 异常页面的模板文件
26 | 'exception_tmpl' => app()->getThinkPath() . 'tpl/think_exception.tpl',
27 |
28 | // 错误显示信息,非调试模式有效
29 | 'error_message' => '页面错误!请稍后再试~',
30 | // 显示错误信息
31 | 'show_error_msg' => false,
32 | ];
33 |
--------------------------------------------------------------------------------
/config/tauthz.php:
--------------------------------------------------------------------------------
1 | 'basic',
8 |
9 | 'log' => [
10 | // changes whether Lauthz will log messages to the Logger.
11 | 'enabled' => false,
12 | // Casbin Logger, Supported: \Psr\Log\LoggerInterface|string
13 | 'logger' => 'log',
14 | ],
15 |
16 | 'enforcers' => [
17 | 'basic' => [
18 | /*
19 | * ModelConfig 设置
20 | */
21 | 'model' => [
22 | // 可选值: "file", "text"
23 | 'config_type' => 'file',
24 | 'config_file_path' => config_path().'tauthz-rbac-model.conf',
25 | 'config_text' => '',
26 | ],
27 |
28 | // 适配器 .
29 | 'adapter' => tauthz\adapter\DatabaseAdapter::class,
30 |
31 | /*
32 | * 数据库设置.
33 | */
34 | 'database' => [
35 | // 数据库连接名称,不填为默认配置.
36 | 'connection' => '',
37 | // 策略表名(不含表前缀)
38 | 'rules_name' => 'rules',
39 | // 策略表完整名称.
40 | 'rules_table' => null,
41 | ],
42 | ],
43 | ],
44 | ];
45 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vuecmf/vuecmf",
3 | "description": "VueCMF是一款完全开源免费的内容管理快速开发框架。采用前后端分离模式搭建,v3版本前端使用vue3、Element Plus和TypeScript构建,后端API基于ThinkPHP8开发。可用于快速开发CMS、CRM、WMS、OMS、ERP等管理系统,开发简单、高效易用,极大减少系统的开发周期和研发成本!甚至不用写一行代码使用VueCMF就能设计出功能强大的后台管理系统。",
4 | "keywords": [
5 | "framework",
6 | "thinkphp",
7 | "vuecmf"
8 | ],
9 | "type": "project",
10 | "homepage": "http://www.vuecmf.com/",
11 | "license": "Apache-2.0",
12 | "require": {
13 | "php": ">=8.0.0",
14 | "topthink/framework": "^8.0",
15 | "topthink/think-orm": "^3.0",
16 | "topthink/think-filesystem": "^2.0",
17 | "vuecmf/framework": "^3.0.1"
18 | },
19 | "require-dev": {
20 | "symfony/var-dumper": "^4.2",
21 | "topthink/think-trace": "^1.0"
22 | },
23 | "autoload": {
24 | "psr-4": {
25 | "app\\": "app"
26 | },
27 | "psr-0": {
28 | "": "extend/"
29 | }
30 | },
31 | "config": {
32 | "preferred-install": "dist"
33 | },
34 | "scripts": {
35 | "post-autoload-dump": [
36 | "@php think service:discover",
37 | "@php think vendor:publish"
38 | ]
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/config/log.php:
--------------------------------------------------------------------------------
1 | 'file',
9 | // 日志记录级别
10 | 'level' => [],
11 | // 日志类型记录的通道 ['error'=>'email',...]
12 | 'type_channel' => [],
13 | // 关闭全局日志写入
14 | 'close' => false,
15 | // 全局日志处理 支持闭包
16 | 'processor' => null,
17 |
18 | // 日志通道列表
19 | 'channels' => [
20 | 'file' => [
21 | // 日志记录方式
22 | 'type' => 'File',
23 | // 日志保存目录
24 | 'path' => '',
25 | // 单文件日志写入
26 | 'single' => false,
27 | // 独立日志级别
28 | 'apart_level' => [],
29 | // 最大日志文件数量
30 | 'max_files' => 0,
31 | // 使用JSON格式记录
32 | 'json' => false,
33 | // 日志处理
34 | 'processor' => null,
35 | // 关闭通道日志写入
36 | 'close' => false,
37 | // 日志输出格式化
38 | 'format' => '[%s][%s] %s',
39 | // 是否实时写入
40 | 'realtime_write' => false,
41 | ],
42 | // 其它日志通道配置
43 | ],
44 |
45 | ];
46 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
3 | 版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn)
4 | All rights reserved。
5 | ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
6 |
7 | Apache Licence是著名的非盈利开源组织Apache采用的协议。
8 | 该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,
9 | 允许代码修改,再作为开源或商业软件发布。需要满足
10 | 的条件:
11 | 1. 需要给代码的用户一份Apache Licence ;
12 | 2. 如果你修改了代码,需要在被修改的文件中说明;
13 | 3. 在延伸的代码中(修改和有源代码衍生的代码中)需要
14 | 带有原来代码中的协议,商标,专利声明和其他原来作者规
15 | 定需要包含的说明;
16 | 4. 如果再发布的产品中包含一个Notice文件,则在Notice文
17 | 件中需要带有本协议内容。你可以在Notice中增加自己的
18 | 许可,但不可以表现为对Apache Licence构成更改。
19 | 具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | POSSIBILITY OF SUCH DAMAGE.
33 |
--------------------------------------------------------------------------------
/config/route.php:
--------------------------------------------------------------------------------
1 | '/',
9 | // URL伪静态后缀
10 | 'url_html_suffix' => 'html',
11 | // URL普通方式参数 用于自动生成
12 | 'url_common_param' => true,
13 | // 是否开启路由延迟解析
14 | 'url_lazy_route' => false,
15 | // 是否强制使用路由
16 | 'url_route_must' => false,
17 | // 合并路由规则
18 | 'route_rule_merge' => false,
19 | // 路由是否完全匹配
20 | 'route_complete_match' => false,
21 | // 访问控制器层名称
22 | 'controller_layer' => 'controller',
23 | // 空控制器名
24 | 'empty_controller' => 'Error',
25 | // 是否使用控制器后缀
26 | 'controller_suffix' => false,
27 | // 默认的路由变量规则
28 | 'default_route_pattern' => '[\w\.]+',
29 | // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
30 | 'request_cache_key' => false,
31 | // 请求缓存有效期
32 | 'request_cache_expire' => null,
33 | // 全局请求缓存排除规则
34 | 'request_cache_except' => [],
35 | // 默认控制器名
36 | 'default_controller' => 'Index',
37 | // 默认操作名
38 | 'default_action' => 'index',
39 | // 操作方法后缀
40 | 'action_suffix' => '',
41 | // 默认JSONP格式返回的处理方法
42 | 'default_jsonp_handler' => 'jsonpReturn',
43 | // 默认JSONP处理方法
44 | 'var_jsonp_handler' => 'callback',
45 | ];
46 |
--------------------------------------------------------------------------------
/app/ExceptionHandle.php:
--------------------------------------------------------------------------------
1 | = 5.7
43 | * v3版本:PHP >= 8.0;v2版本:PHP >= 7.4
44 |
45 |
46 | 注意:**以下操作均在命令行中执行**
47 |
48 | ## 安装
49 |
50 | 创建新项目
51 |
52 | ~~~
53 | composer create-project vuecmf/vuecmf myproject
54 | ~~~
55 |
56 | 若在已有基于thinkphp8的项目中安装, 则需执行下面
57 | ~~~
58 | composer require vuecmf/framework
59 |
60 | php think vuecmf:publish
61 | ~~~
62 |
63 | ## 初始化数据
64 |
65 | 修改.env文件中数据库连接配置(已设置则跳过)
66 |
67 | 然后执行迁移工具
68 |
69 | ```
70 | php think migrate:run
71 | ```
72 |
73 | ## 更新框架
74 | ~~~
75 | composer update vuecmf/framework
76 | ~~~
77 |
78 | ## 注意
79 | 服务器必须配置伪静态,前端才可正常请求后端接口
80 | 配置示例见[使用手册](http://www.vuecmf.com/guide/#php%E8%AF%AD%E8%A8%80%E7%89%88%E6%9C%AC-1/)
81 |
82 | ## Docker部署
83 | 若没有安装docker,则必须先安装docker,然后在项目根目录下执行如下命令即可快速部署项目
84 | ```
85 | docker compose up -d
86 | ```
87 |
--------------------------------------------------------------------------------
/config/database.php:
--------------------------------------------------------------------------------
1 | env('DB_DRIVER', 'mysql'),
6 |
7 | // 自定义时间查询规则
8 | 'time_query_rule' => [],
9 |
10 | // 自动写入时间戳字段
11 | // true为自动识别类型 false关闭
12 | // 字符串则明确指定时间字段类型 支持 int timestamp datetime date
13 | 'auto_timestamp' => true,
14 |
15 | // 时间字段取出后的默认时间格式
16 | 'datetime_format' => 'Y-m-d H:i:s',
17 |
18 | // 时间字段配置 配置格式:create_time,update_time
19 | 'datetime_field' => '',
20 |
21 | // 数据库连接配置信息
22 | 'connections' => [
23 | 'mysql' => [
24 | // 数据库类型
25 | 'type' => env('DB_TYPE', 'mysql'),
26 | // 服务器地址
27 | 'hostname' => env('DB_HOST', '127.0.0.1'),
28 | // 数据库名
29 | 'database' => env('DB_NAME', ''),
30 | // 用户名
31 | 'username' => env('DB_USER', 'root'),
32 | // 密码
33 | 'password' => env('DB_PASS', ''),
34 | // 端口
35 | 'hostport' => env('DB_PORT', '3306'),
36 | // 数据库连接参数
37 | 'params' => [],
38 | // 数据库编码默认采用utf8
39 | 'charset' => env('DB_CHARSET', 'utf8'),
40 | // 数据库表前缀
41 | 'prefix' => env('DB_PREFIX', ''),
42 |
43 | // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
44 | 'deploy' => 0,
45 | // 数据库读写是否分离 主从式有效
46 | 'rw_separate' => false,
47 | // 读写分离后 主服务器数量
48 | 'master_num' => 1,
49 | // 指定从服务器序号
50 | 'slave_no' => '',
51 | // 是否严格检查字段是否存在
52 | 'fields_strict' => true,
53 | // 是否需要断线重连
54 | 'break_reconnect' => false,
55 | // 监听SQL
56 | 'trigger_sql' => env('APP_DEBUG', true),
57 | // 开启字段缓存
58 | 'fields_cache' => false,
59 | ],
60 |
61 | // 更多的数据库配置信息
62 | ],
63 | ];
64 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 |
3 | language: php
4 |
5 | branches:
6 | only:
7 | - stable
8 |
9 | cache:
10 | directories:
11 | - $HOME/.composer/cache
12 |
13 | before_install:
14 | - composer self-update
15 |
16 | install:
17 | - composer install --no-dev --no-interaction --ignore-platform-reqs
18 | - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Core.zip .
19 | - composer require --update-no-dev --no-interaction "topthink/think-image:^1.0"
20 | - composer require --update-no-dev --no-interaction "topthink/think-migration:^1.0"
21 | - composer require --update-no-dev --no-interaction "topthink/think-captcha:^1.0"
22 | - composer require --update-no-dev --no-interaction "topthink/think-mongo:^1.0"
23 | - composer require --update-no-dev --no-interaction "topthink/think-worker:^1.0"
24 | - composer require --update-no-dev --no-interaction "topthink/think-helper:^1.0"
25 | - composer require --update-no-dev --no-interaction "topthink/think-queue:^1.0"
26 | - composer require --update-no-dev --no-interaction "topthink/think-angular:^1.0"
27 | - composer require --dev --update-no-dev --no-interaction "topthink/think-testing:^1.0"
28 | - zip -r --exclude='*.git*' --exclude='*.zip' --exclude='*.travis.yml' ThinkPHP_Full.zip .
29 |
30 | script:
31 | - php think unit
32 |
33 | deploy:
34 | provider: releases
35 | api_key:
36 | secure: TSF6bnl2JYN72UQOORAJYL+CqIryP2gHVKt6grfveQ7d9rleAEoxlq6PWxbvTI4jZ5nrPpUcBUpWIJHNgVcs+bzLFtyh5THaLqm39uCgBbrW7M8rI26L8sBh/6nsdtGgdeQrO/cLu31QoTzbwuz1WfAVoCdCkOSZeXyT/CclH99qV6RYyQYqaD2wpRjrhA5O4fSsEkiPVuk0GaOogFlrQHx+C+lHnf6pa1KxEoN1A0UxxVfGX6K4y5g4WQDO5zT4bLeubkWOXK0G51XSvACDOZVIyLdjApaOFTwamPcD3S1tfvuxRWWvsCD5ljFvb2kSmx5BIBNwN80MzuBmrGIC27XLGOxyMerwKxB6DskNUO9PflKHDPI61DRq0FTy1fv70SFMSiAtUv9aJRT41NQh9iJJ0vC8dl+xcxrWIjU1GG6+l/ZcRqVx9V1VuGQsLKndGhja7SQ+X1slHl76fRq223sMOql7MFCd0vvvxVQ2V39CcFKao/LB1aPH3VhODDEyxwx6aXoTznvC/QPepgWsHOWQzKj9ftsgDbsNiyFlXL4cu8DWUty6rQy8zT2b4O8b1xjcwSUCsy+auEjBamzQkMJFNlZAIUrukL/NbUhQU37TAbwsFyz7X0E/u/VMle/nBCNAzgkMwAUjiHM6FqrKKBRWFbPrSIixjfjkCnrMEPw=
37 | file:
38 | - ThinkPHP_Core.zip
39 | - ThinkPHP_Full.zip
40 | skip_cleanup: true
41 | on:
42 | tags: true
43 |
--------------------------------------------------------------------------------
/app/BaseController.php:
--------------------------------------------------------------------------------
1 | app = $app;
47 | $this->request = $this->app->request;
48 |
49 | // 控制器初始化
50 | $this->initialize();
51 | }
52 |
53 | // 初始化
54 | protected function initialize()
55 | {}
56 |
57 | /**
58 | * 验证数据
59 | * @access protected
60 | * @param array $data 数据
61 | * @param string|array $validate 验证器名或者验证规则数组
62 | * @param array $message 提示信息
63 | * @param bool $batch 是否批量验证
64 | * @return array|string|true
65 | * @throws ValidateException
66 | */
67 | protected function validate(array $data, string|array $validate, array $message = [], bool $batch = false)
68 | {
69 | if (is_array($validate)) {
70 | $v = new Validate();
71 | $v->rule($validate);
72 | } else {
73 | if (strpos($validate, '.')) {
74 | // 支持场景
75 | [$validate, $scene] = explode('.', $validate);
76 | }
77 | $class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate);
78 | $v = new $class();
79 | if (!empty($scene)) {
80 | $v->scene($scene);
81 | }
82 | }
83 |
84 | $v->message($message);
85 |
86 | // 是否批量验证
87 | if ($batch || $this->batchValidate) {
88 | $v->batch(true);
89 | }
90 |
91 | return $v->failException(true)->check($data);
92 | }
93 |
94 | }
95 |
--------------------------------------------------------------------------------
/database/migrations/20240406230620_create_rules_table.php:
--------------------------------------------------------------------------------
1 | getDbConfig();
16 |
17 | $adapter = AdapterFactory::instance()->getAdapter($options['adapter'], $options);
18 |
19 | if ($adapter->hasOption('table_prefix') || $adapter->hasOption('table_suffix')) {
20 | $adapter = AdapterFactory::instance()->getWrapper('prefix', $adapter);
21 | }
22 |
23 | $this->setAdapter( $adapter);
24 | }
25 |
26 | /**
27 | * 获取数据库配置
28 | * @return array
29 | */
30 | protected function getDbConfig(): array
31 | {
32 | $default = config('tauthz.database.connection') ?: config('database.default');
33 |
34 | $config = config("database.connections.{$default}");
35 |
36 | if (0 == $config['deploy']) {
37 | $dbConfig = [
38 | 'adapter' => $config['type'],
39 | 'host' => $config['hostname'],
40 | 'name' => $config['database'],
41 | 'user' => $config['username'],
42 | 'pass' => $config['password'],
43 | 'port' => $config['hostport'],
44 | 'charset' => $config['charset'],
45 | 'table_prefix' => $config['prefix'],
46 | ];
47 | } else {
48 | $dbConfig = [
49 | 'adapter' => explode(',', $config['type'])[0],
50 | 'host' => explode(',', $config['hostname'])[0],
51 | 'name' => explode(',', $config['database'])[0],
52 | 'user' => explode(',', $config['username'])[0],
53 | 'pass' => explode(',', $config['password'])[0],
54 | 'port' => explode(',', $config['hostport'])[0],
55 | 'charset' => explode(',', $config['charset'])[0],
56 | 'table_prefix' => explode(',', $config['prefix'])[0],
57 | ];
58 | }
59 |
60 | $table = config('database.migration_table', 'migrations');
61 |
62 | $dbConfig['migration_table'] = $dbConfig['table_prefix'] . $table;
63 |
64 | return $dbConfig;
65 | }
66 |
67 | /**
68 | * Change Method.
69 | *
70 | * Write your reversible migrations using this method.
71 | *
72 | * More information on writing migrations is available here:
73 | * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
74 | *
75 | * The following commands can be used in this method and Phinx will
76 | * automatically reverse them when rolling back:
77 | *
78 | * createTable
79 | * renameTable
80 | * addColumn
81 | * renameColumn
82 | * addIndex
83 | * addForeignKey
84 | *
85 | * Remember to call "create()" or "update()" and NOT "save()" when working
86 | * with the Table class.
87 | */
88 | public function up()
89 | {
90 | $default = config('tauthz.default');
91 | $table = $this->table(config('tauthz.enforcers.'.$default.'.database.rules_name'), ['id' => true, 'comment'=>'系统--授权规则表']);
92 | $table->addColumn('ptype', 'string', ['length' => 4,'null' => false,'default' => '', 'comment'=>'类型:g=组或角色,p=策略'])
93 | ->addColumn('v0', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '对应定义的sub(用户名或角色名)'])
94 | ->addColumn('v1', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '对应定义的dom(角色或应用名)'])
95 | ->addColumn('v2', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '对应定义的obj(应用名或控制器名)'])
96 | ->addColumn('v3', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '对应定义的act(动作名称)'])
97 | ->addColumn('v4', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '预留,暂用不到'])
98 | ->addColumn('v5', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '预留,暂用不到'])
99 | ->addColumn('v6', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '预留,暂用不到'])
100 | ->addColumn('v7', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '预留,暂用不到'])
101 | ->addIndex(['ptype','v0','v1','v2','v3','v4','v5','v6','v7'], ['unique' => true])
102 | ->create();
103 | }
104 |
105 | public function down()
106 | {
107 | $default = config('tauthz.default');
108 | $table = $this->table(config('tauthz.enforcers.'.$default.'.database.rules_name'));
109 | $table->drop();
110 | }
111 | }
112 |
--------------------------------------------------------------------------------
/app/common.php:
--------------------------------------------------------------------------------
1 |
8 | // +----------------------------------------------------------------------
9 |
10 | /**
11 | * ajax请求成功返回的数据结构
12 | * @param string $msg 提示信息
13 | * @param array|boolean|string $data 返回的数据
14 | * @param int $code 状态码
15 | * @return \think\response\Json
16 | */
17 | function ajaxSuccess(string $msg = '', $data = [], int $code = 0): \think\response\Json
18 | {
19 | return json([
20 | 'data' => $data,
21 | 'msg' => $msg,
22 | 'code' => $code
23 | ]);
24 | }
25 |
26 | /**
27 | * ajax请求失败返回的数据结构
28 | * @param object|string $exception 异常对象|异常信息
29 | * @param int $code 状态码
30 | * @param array $data 返回的数据
31 | * @return \think\response\Json
32 | */
33 | function ajaxFail($exception, int $code = 1000, array $data = []): \think\response\Json
34 | {
35 | $msg = '异常:';
36 |
37 | if(is_object($exception)){
38 | $msg .= config('app.show_error_msg') == true ? $exception->getMessage() . ' 在文件' . $exception->getFile() . '中第' . $exception->getLine() . '行': $exception->getMessage();
39 | }else if(is_string($exception)){
40 | $msg .= $exception;
41 | }
42 |
43 | return json([
44 | 'data' => $data,
45 | 'msg' => $msg,
46 | 'code' => $code
47 | ]);
48 | }
49 |
50 | /**
51 | * 获取路由信息
52 | * @param object $request 请求对象实例
53 | * @return array
54 | */
55 | function getRouteInfo($request): array
56 | {
57 | //返回的名称都是小写
58 | return [
59 | 'app_name' => strtolower(app()->http->getName()), //应用路由名称
60 | 'controller' => toUnderline($request->controller()), //控制器路由名称
61 | 'action' => $request->action(true), //操作路由名称
62 | ];
63 | }
64 |
65 | /**
66 | * 下划线转驼峰
67 | * @param string $str 待转换的字符串
68 | * @param string $separator 分隔符
69 | * @return string
70 | */
71 | function toHump(string $str, string $separator='_'): string
72 | {
73 | $str = str_replace($separator, ' ', strtolower($str));
74 | return str_replace(' ','', ucwords($str));
75 | }
76 |
77 | /**
78 | * 驼峰转下划线
79 | * @param string $str 待转换的字符串
80 | * @param string $separator 分隔符
81 | * @return string
82 | */
83 | function toUnderline(string $str, string $separator='_'): string
84 | {
85 | return strtolower(trim(preg_replace("/[A-Z]/", $separator . "$0", $str), $separator));
86 | }
87 |
88 | /**
89 | * 生成登录访问令牌: 当天有效
90 | * @param string $username 用户名
91 | * @param string $pwd 密码加密后的字符串
92 | * @param string $ip 当前登录IP地址
93 | * @return string
94 | */
95 | function makeToken(string $username, string $pwd , string $ip): string
96 | {
97 | return strtolower(md5($username . '_' . $pwd . '_' . $ip . date('Y-m-d') . 'vuecmf'));
98 | }
99 |
100 | /**
101 | * 获取表格的树形列表
102 | * @param object $model 模型实例
103 | * @param int $pid 父级ID
104 | * @param string $keywords 过滤关键词
105 | * @param string $pid_field 父级字段名
106 | * @param string $search_field 过滤字段名
107 | * @param string $order_field 排序字段名
108 | * @param int $total 总条数
109 | * @return array
110 | */
111 | function getTreeList($model, int $pid, string $keywords, string $pid_field = 'pid', string $search_field = 'title', string $order_field = 'sort_num', int &$total = 0): array
112 | {
113 | $query = $model->where($pid_field, $pid);
114 | !empty($keywords) && $query->whereLike($search_field, '%'.$keywords.'%');
115 | !empty($order_field) && $query->order($order_field);
116 | $res = $query->select()->toArray();
117 | $total += count($res);
118 | foreach ($res as &$val){
119 | $child = getTreeList($model, $val['id'], $keywords, $pid_field, $search_field, $order_field, $total);
120 | $val[$pid_field] == 0 && $val[$pid_field] = '';
121 | !empty($child['data']) && $val['children'] = $child['data'];
122 | }
123 | return ['data' => $res, 'total' => $total];
124 | }
125 |
126 |
127 | /**
128 | * 格式化下拉树型列表
129 | * @param array $tree 存储返回的结果
130 | * @param object $model 模型实例
131 | * @param int $pid 父级ID
132 | * @param string $label 标题字段名
133 | * @param string $pid_field 父级字段名
134 | * @param string $order_field 排序字段名
135 | * @param int $level 层级数
136 | * @return array
137 | */
138 | function formatTree(array &$tree, $model, int $pid = 0, string $label = 'title', string $pid_field = 'pid', string $order_field = 'sort_num', int $level = 1): array
139 | {
140 | $index_key = $model->getPk();
141 | $query = $model->where($pid_field,$pid)
142 | ->where('status', 10);
143 | !empty($order_field) && $query->order($order_field);
144 | $res = $query->column($label, $index_key);
145 |
146 | if(!empty($res)){
147 | foreach($res as $key => $val){
148 |
149 | $prefix = str_repeat('┊ ',$level-1);
150 |
151 | $keys = array_keys($res);
152 | $child = $model->where($pid_field, $key)
153 | ->where('status', 10)
154 | ->count();
155 |
156 | if($child || $key != end($keys)){
157 | $prefix .= '┊┈ ';
158 | }else{
159 | $prefix .= '└─ ';
160 | }
161 |
162 | $item = [];
163 | $item['value'] = $key;
164 | $item['label'] = $prefix . $val;
165 |
166 | $tree[] = $item;
167 |
168 | formatTree($tree, $model, $key, $label, $pid_field, $order_field,$level + 1);
169 | }
170 | }
171 |
172 | return $tree;
173 | }
174 |
175 |
176 | /**
177 | * 获取目录树的层级路径
178 | * @param string $id_path 层级路径
179 | * @param object $model 模型实例
180 | * @param int $pid 父级ID
181 | * @param string $pid_field 父级ID的字段名称
182 | * @return mixed|string
183 | */
184 | function getTreeIdPath(string &$id_path, $model, int $pid = 0, string $pid_field = 'pid')
185 | {
186 | $pid_val = $model->where('id',$pid)->where('status', 10)->value($pid_field);
187 |
188 | $pid_val != 0 && $id_path = $pid_val . ',' . $id_path;
189 |
190 | if($pid_val != 0){
191 | $id_path = getTreeIdPath($id_path, $model, $pid_val, $pid_field);
192 | }
193 |
194 | return $id_path;
195 | }
196 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/database/migrations/20240406230630_vuecmf_database.php:
--------------------------------------------------------------------------------
1 | table('model_config', ['id' => true, 'comment'=>'系统--模型配置管理表'])
45 | ->addColumn('app_id', 'integer', ['length' => 10, 'null' => false, 'default' => 0, 'comment' => '所属应用ID'])
46 | ->addColumn('table_name', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '模型对应的表名(不含表前缘)'])
47 | ->addColumn('label', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '模型标签'])
48 | ->addColumn('component_tpl', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '组件模板'])
49 | ->addColumn('default_action_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '默认动作ID'])
50 | ->addColumn('search_field_id', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '搜索字段ID,多个用竖线分隔'])
51 | ->addColumn('type', 'integer', ['length' => 255, 'null' => false, 'default' => 20, 'comment' => '类型:10=内置,20=扩展'])
52 | ->addColumn('is_tree', 'integer', ['length' => 255, 'null' => false, 'default' => 20, 'comment' => '是否为目录树:10=是,20=否'])
53 | ->addColumn('remark', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '模型对应表的备注'])
54 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
55 | ->addIndex(['app_id','table_name'], ['unique' => true])
56 | ->create();
57 |
58 | $this->table('model_field', ['id' => true, 'comment'=>'系统--模型字段管理表'])
59 | ->addColumn('field_name', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '字段名称'])
60 | ->addColumn('label', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '字段中文名称'])
61 | ->addColumn('model_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '所属模型ID'])
62 | ->addColumn('type', 'string', ['length' => 20, 'null' => false, 'default' => '', 'comment' => '字段类型'])
63 | ->addColumn('length', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '字段长度'])
64 | ->addColumn('decimal_length', 'integer', ['length' => 255, 'null' => false, 'default' => 0, 'comment' => '小数位数长度'])
65 | ->addColumn('is_null', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '是否为空:10=是,20=否'])
66 | ->addColumn('note', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '字段备注说明'])
67 | ->addColumn('default_value', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '默认值'])
68 | ->addColumn('is_auto_increment', 'integer', ['length' => 255, 'null' => false, 'default' => 20, 'comment' => '是否自动递增:10=是,20=否'])
69 | ->addColumn('is_label', 'integer', ['length' => 255, 'null' => false, 'default' => 20, 'comment' => '是否为标题字段:10=是,20=否'])
70 | ->addColumn('is_signed', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '是否可为负数:10=是,20=否'])
71 | ->addColumn('is_show', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '默认列表中显示:10=显示,20=不显示'])
72 | ->addColumn('is_fixed', 'integer', ['length' => 255, 'null' => false, 'default' => 20, 'comment' => '默认列表中固定:10=固定,20=不固定'])
73 | ->addColumn('column_width', 'integer', ['length' => 11, 'null' => false, 'default' => 150, 'comment' => '默认列宽度'])
74 | ->addColumn('is_filter', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '是否可筛选:10=是,20=否'])
75 | ->addColumn('is_code', 'integer', ['length' => 255, 'null' => false, 'default' => 20, 'comment' => '是否显示文本源码,10=是,20=否','after' => 'is_filter'])
76 | ->addColumn('sort_num', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '排序(小在前)'])
77 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
78 | ->addIndex(['field_name','model_id'], ['unique' => true])
79 | ->create();
80 |
81 | $this->table('field_option', ['id' => true, 'comment'=>'系统--字段的选项列表'])
82 | ->addColumn('model_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '所属模型ID'])
83 | ->addColumn('model_field_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '模型字段ID'])
84 | ->addColumn('option_value', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '选项值'])
85 | ->addColumn('option_label', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '选项标签'])
86 | ->addColumn('type', 'integer', ['length' => 255, 'null' => false, 'default' => 20, 'comment' => '类型:10=内置,20=扩展'])
87 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
88 | ->addIndex(['model_field_id','option_value'], ['unique' => true])
89 | ->create();
90 |
91 | $this->table('model_action', ['id' => true, 'comment'=>'系统--模型动作表'])
92 | ->addColumn('label', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '动作标签'])
93 | ->addColumn('api_path', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '后端请求地址'])
94 | ->addColumn('model_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '所属模型ID'])
95 | ->addColumn('action_type', 'string', ['length' => 32, 'null' => false, 'default' => '', 'comment' => '动作类型'])
96 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
97 | ->addIndex(['action_type','model_id'], ['unique' => true])
98 | ->create();
99 |
100 | $this->table('model_relation', ['id' => true, 'comment'=>'系统--模型关联设置表'])
101 | ->addColumn('model_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '模型ID'])
102 | ->addColumn('model_field_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '模型字段ID'])
103 | ->addColumn('relation_model_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '关联模型ID'])
104 | ->addColumn('relation_field_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '关联模型字段ID'])
105 | ->addColumn('relation_show_field_id', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '关联模型显示字段ID,多个逗号分隔,全部用*'])
106 | ->addColumn('relation_filter', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '关联过滤条件'])
107 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
108 | ->addIndex(['model_field_id','relation_field_id'], ['unique' => true])
109 | ->create();
110 |
111 | $this->table('model_index', ['id' => true, 'comment'=>'系统--模型索引设置表'])
112 | ->addColumn('model_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '模型ID'])
113 | ->addColumn('model_field_id', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '模型字段ID, 多个用逗号分隔'])
114 | ->addColumn('index_type', 'string', ['length' => 32, 'null' => false, 'default' => 'NORMAL', 'comment' => '索引类型: PRIMARY=主键,NORMAL=常规,UNIQUE=唯一,FULLTEXT=全文'])
115 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
116 | ->create();
117 |
118 | $this->table('menu', ['id' => true, 'comment'=>'系统--菜单表'])
119 | ->addColumn('title', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '菜单标题'])
120 | ->addColumn('icon', 'string', ['length' => 32, 'null' => false, 'default' => '', 'comment' => '菜单图标'])
121 | ->addColumn('pid', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '父级DI'])
122 | ->addColumn('id_path', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => 'ID路径,英文逗号分隔'])
123 | ->addColumn('path_name', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '菜单路径,英文逗号分隔'])
124 | ->addColumn('model_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '模型ID'])
125 | ->addColumn('app_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '应用ID'])
126 | ->addColumn('type', 'integer', ['length' => 255, 'null' => false, 'default' => 20, 'comment' => '类型:10=内置,20=扩展'])
127 | ->addColumn('sort_num', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '排序(小在前)'])
128 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
129 | ->create();
130 |
131 | $this->table('admin', ['id' => true, 'comment'=>'系统--管理员表'])
132 | ->addColumn('username', 'string', ['length' => 32, 'null' => false, 'default' => '', 'comment' => '用户名'])
133 | ->addColumn('password', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '密码'])
134 | ->addColumn('email', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '邮箱'])
135 | ->addColumn('mobile', 'string', ['length' => 32, 'null' => false, 'default' => '', 'comment' => '手机'])
136 | ->addColumn('is_super', 'integer', ['length' => 255, 'null' => false, 'default' => 20, 'comment' => '超级管理员:10=是,20=否'])
137 | ->addColumn('reg_time', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '注册时间'])
138 | ->addColumn('reg_ip', 'string', ['length' => 24, 'null' => false, 'default' => '', 'comment' => '注册IP'])
139 | ->addColumn('last_login_time', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '最后登录时间'])
140 | ->addColumn('last_login_ip', 'string', ['length' => 24, 'null' => false, 'default' => '', 'comment' => '最后登录IP'])
141 | ->addColumn('update_time', 'timestamp', ['null' => false, 'default' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间'])
142 | ->addColumn('token', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => 'api访问token'])
143 | ->addColumn('pid', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '父级用户ID'])
144 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
145 | ->addIndex(['username'], ['unique' => true])
146 | ->addIndex(['email'], ['unique' => true])
147 | ->addIndex(['mobile'], ['unique' => true])
148 | ->create();
149 |
150 | $this->table('model_form', ['id' => true, 'comment'=>'系统--模型表单表'])
151 | ->addColumn('model_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '模型ID'])
152 | ->addColumn('model_field_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '模型字段ID'])
153 | ->addColumn('type', 'string', ['length' => 32, 'null' => false, 'default' => '', 'comment' => '控件类型'])
154 | ->addColumn('default_value', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '控件默认值'])
155 | ->addColumn('is_disabled', 'integer', ['length' => 255, 'null' => false, 'default' => 20, 'comment' => '表单中是否禁用: 10=是,20=否'])
156 | ->addColumn('placeholder', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '表单提示信息'])
157 | ->addColumn('is_edit', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '可编辑:10=是,20=否'])
158 | ->addColumn('sort_num', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '排序(小在前)'])
159 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
160 | ->addIndex(['model_field_id'], ['unique' => true])
161 | ->create();
162 |
163 | $this->table('model_form_rules', ['id' => true, 'comment'=>'系统--模型表单验证设置表'])
164 | ->addColumn('model_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '模型ID'])
165 | ->addColumn('model_form_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '模型表单ID'])
166 | ->addColumn('rule_type', 'string', ['length' => 32, 'null' => false, 'default' => '', 'comment' => '表单验证类型'])
167 | ->addColumn('rule_value', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '表单验证规则'])
168 | ->addColumn('error_tips', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '表单验证不通过的错误提示信息'])
169 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
170 | ->create();
171 |
172 | $this->table('roles', ['id' => true, 'comment'=>'系统--角色表'])
173 | ->addColumn('role_name', 'string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '角色名称'])
174 | ->addColumn('pid', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '父级DI'])
175 | ->addColumn('id_path', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => 'ID层级路径'])
176 | ->addColumn('remark', 'string', ['length' => 255, 'null' => false, 'default' => '', 'comment' => '角色的备注信息'])
177 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
178 | ->addIndex(['role_name'], ['unique' => true])
179 | ->create();
180 |
181 | $this->table('model_form_linkage', ['id' => true, 'comment'=>'系统--模型表单联动设置表'])
182 | ->addColumn('model_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '模型ID'])
183 | ->addColumn('model_field_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '模型字段ID'])
184 | ->addColumn('linkage_field_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '联动表单的字段ID'])
185 | ->addColumn('linkage_action_id', 'integer', ['length' => 11, 'null' => false, 'default' => 0, 'comment' => '获取联动表单数据的动作ID'])
186 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
187 | ->addIndex(['model_field_id','linkage_field_id'], ['unique' => true])
188 | ->create();
189 |
190 |
191 | $this->table('app_config', ['id' => true, 'comment'=>'系统--应用配置表'])
192 | ->addColumn('app_name','string', ['length' => 64, 'null' => false, 'default' => '', 'comment' => '应用名称'])
193 | ->addColumn('login_enable', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '是否开启登录验证, 10=是,20=否'])
194 | ->addColumn('auth_enable', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '是否开启权限验证, 10=是,20=否'])
195 | ->addColumn('exclusion_url', 'string', ['length' => 2000, 'null' => false, 'default' => '', 'comment' => '排除验证的URL,多个用英文逗号分隔'])
196 | ->addColumn('type', 'integer', ['length' => 255, 'null' => false, 'default' => 20, 'comment' => '类型:10=内置,20=扩展'])
197 | ->addColumn('status', 'integer', ['length' => 255, 'null' => false, 'default' => 10, 'comment' => '状态:10=开启,20=禁用'])
198 | ->addIndex(['app_name'], ['unique' => true])
199 | ->create();
200 |
201 | //写入初始数据
202 | //app_config 应用配置表
203 | $data = [
204 | ['id' => 1,'app_name' => 'vuecmf','login_enable' => 10,'auth_enable' => 10,'exclusion_url' => '/vuecmf/admin/login, /vuecmf/admin/logout, /vuecmf/model_action/get_api_map','type' => 10,'status' => 10,],
205 | ];
206 | $this->table('app_config')->insert($data)->save();
207 |
208 | //model_config 模型配置表
209 | $data = [
210 | ['id' => 1,'app_id' => 1,'table_name' => 'model_config','label' => '模型配置','component_tpl' => 'template/content/List','default_action_id' => 1,'search_field_id' => '3,4,5','type' => 10,'is_tree' => 20,'remark' => '系统--模型配置管理表','status' => 10,],
211 | ['id' => 2,'app_id' => 1,'table_name' => 'model_action','label' => '模型动作','component_tpl' => 'template/content/List','default_action_id' => 20,'search_field_id' => '21,22,24','type' => 10,'is_tree' => 20,'remark' => '系统--模型动作表','status' => 10,],
212 | ['id' => 3,'app_id' => 1,'table_name' => 'model_field','label' => '模型字段','component_tpl' => 'template/content/List','default_action_id' => 40,'search_field_id' => '41,42,44','type' => 10,'is_tree' => 20,'remark' => '系统--模型字段管理表','status' => 10,],
213 | ['id' => 4,'app_id' => 1,'table_name' => 'field_option','label' => '字段选项','component_tpl' => 'template/content/List','default_action_id' => 60,'search_field_id' => '64,65','type' => 10,'is_tree' => 20,'remark' => '系统--字段的选项列表','status' => 10,],
214 | ['id' => 5,'app_id' => 1,'table_name' => 'model_index','label' => '模型索引','component_tpl' => 'template/content/List','default_action_id' => 80,'search_field_id' => '83','type' => 10,'is_tree' => 20,'remark' => '系统--模型索引设置表','status' => 10,],
215 | ['id' => 6,'app_id' => 1,'table_name' => 'model_relation','label' => '模型关联','component_tpl' => 'template/content/List','default_action_id' => 100,'search_field_id' => '102,104','type' => 10,'is_tree' => 20,'remark' => '系统--模型关联设置表','status' => 10,],
216 | ['id' => 7,'app_id' => 1,'table_name' => 'menu','label' => '菜单','component_tpl' => 'template/content/List','default_action_id' => 120,'search_field_id' => '121,122,126','type' => 10,'is_tree' => 10,'remark' => '系统--菜单表','status' => 10,],
217 | ['id' => 8,'app_id' => 1,'table_name' => 'admin','label' => '管理员','component_tpl' => 'template/content/List','default_action_id' => 140,'search_field_id' => '141,143,144','type' => 10,'is_tree' => 20,'remark' => '系统--管理员表','status' => 10,],
218 | ['id' => 9,'app_id' => 1,'table_name' => 'model_form','label' => '模型表单','component_tpl' => 'template/content/List','default_action_id' => 180,'search_field_id' => '163,164','type' => 10,'is_tree' => 20,'remark' => '系统--模型表单设置表','status' => 10,],
219 | ['id' => 10,'app_id' => 1,'table_name' => 'model_form_rules','label' => '模型表单验证','component_tpl' => 'template/content/List','default_action_id' => 200,'search_field_id' => '183,184,185','type' => 10,'is_tree' => 20,'remark' => '系统--模型表单验证设置表','status' => 10,],
220 | ['id' => 11,'app_id' => 1,'table_name' => 'roles','label' => '角色','component_tpl' => 'template/content/List','default_action_id' => 220,'search_field_id' => '201','type' => 10,'is_tree' => 10,'remark' => '系统--角色表','status' => 10,],
221 | ['id' => 12,'app_id' => 1,'table_name' => 'model_form_linkage','label' => '模型表单联动','component_tpl' => 'template/content/List','default_action_id' => 260,'search_field_id' => '221,222,223','type' => 10,'is_tree' => 20,'remark' => '系统--模型表单联动设置表','status' => 10,],
222 | ['id' => 13,'app_id' => 1,'table_name' => 'upload_file','label' => '文件上传','component_tpl' => '','default_action_id' => 0,'search_field_id' => '','type' => 10,'is_tree' => 20,'remark' => '系统--文件上传','status' => 10,],
223 | ['id' => 14,'app_id' => 1,'table_name' => 'app_config','label' => '应用配置','component_tpl' => 'template/content/List','default_action_id' => 300,'search_field_id' => '241,244','type' => 10,'is_tree' => 20,'remark' => '系统--应用配置表','status' => 10,],
224 | ];
225 | $this->table('model_config')->insert($data)->save();
226 |
227 | //model_field 字段表
228 | $data = [
229 | ['id' => 1,'field_name' => 'id','label' => 'ID','model_id' => 1,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 1,'status' => 10,],
230 | ['id' => 2,'field_name' => 'app_id','label' => '所属应用','model_id' => 1,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '所属应用ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 2,'status' => 10,],
231 | ['id' => 3,'field_name' => 'table_name','label' => '表名','model_id' => 1,'type' => 'varchar','length' => 64,'decimal_length' => 0,'is_null' => 20,'note' => '模型对应的表名(不含表前缘)','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 3,'status' => 10,],
232 | ['id' => 4,'field_name' => 'label','label' => '模型标签','model_id' => 1,'type' => 'varchar','length' => 64,'decimal_length' => 0,'is_null' => 20,'note' => '模型标签','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 4,'status' => 10,],
233 | ['id' => 5,'field_name' => 'component_tpl','label' => '组件模板','model_id' => 1,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '组件模板','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 5,'status' => 10,],
234 | ['id' => 6,'field_name' => 'default_action_id','label' => '默认动作','model_id' => 1,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '默认动作ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 6,'status' => 10,],
235 | ['id' => 7,'field_name' => 'search_field_id','label' => '搜索字段','model_id' => 1,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '搜索字段ID,多个用逗号分隔','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 300,'is_filter' => 20,'sort_num' => 7,'status' => 10,],
236 | ['id' => 8,'field_name' => 'type','label' => '类型','model_id' => 1,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '类型:10=内置,20=扩展','default_value' => '20','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 8,'status' => 10,],
237 | ['id' => 9,'field_name' => 'is_tree','label' => '目录树','model_id' => 1,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '是否为目录树:10=是,20=否','default_value' => '20','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 9,'status' => 10,],
238 | ['id' => 10,'field_name' => 'remark','label' => '表备注','model_id' => 1,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '模型对应表的备注','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 10,'status' => 10,],
239 | ['id' => 11,'field_name' => 'status','label' => '状态','model_id' => 1,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 11,'status' => 10,],
240 | ['id' => 20,'field_name' => 'id','label' => 'ID','model_id' => 2,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 12,'status' => 10,],
241 | ['id' => 21,'field_name' => 'label','label' => '动作标签','model_id' => 2,'type' => 'varchar','length' => 64,'decimal_length' => 0,'is_null' => 20,'note' => '动作标签','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 13,'status' => 10,],
242 | ['id' => 22,'field_name' => 'api_path','label' => '后端请求地址','model_id' => 2,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '后端请求地址','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 14,'status' => 10,],
243 | ['id' => 23,'field_name' => 'model_id','label' => '所属模型','model_id' => 2,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '所属模型ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 15,'status' => 10,],
244 | ['id' => 24,'field_name' => 'action_type','label' => '动作类型','model_id' => 2,'type' => 'varchar','length' => 32,'decimal_length' => 0,'is_null' => 20,'note' => '动作类型','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 16,'status' => 10,],
245 | ['id' => 25,'field_name' => 'status','label' => '状态','model_id' => 2,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 17,'status' => 10,],
246 | ['id' => 40,'field_name' => 'id','label' => 'ID','model_id' => 3,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 18,'status' => 10,],
247 | ['id' => 41,'field_name' => 'field_name','label' => '字段名称','model_id' => 3,'type' => 'varchar','length' => 64,'decimal_length' => 0,'is_null' => 20,'note' => '表的字段名称','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 19,'status' => 10,],
248 | ['id' => 42,'field_name' => 'label','label' => '字段中文名','model_id' => 3,'type' => 'varchar','length' => 64,'decimal_length' => 0,'is_null' => 20,'note' => '表的字段中文名称','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 20,'status' => 10,],
249 | ['id' => 43,'field_name' => 'model_id','label' => '所属模型','model_id' => 3,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '所属模型ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 21,'status' => 10,],
250 | ['id' => 44,'field_name' => 'type','label' => '字段类型','model_id' => 3,'type' => 'varchar','length' => 20,'decimal_length' => 0,'is_null' => 20,'note' => '表的字段类型','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 22,'status' => 10,],
251 | ['id' => 45,'field_name' => 'length','label' => '字段长度','model_id' => 3,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '表的字段长度','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 23,'status' => 10,],
252 | ['id' => 46,'field_name' => 'decimal_length','label' => '小数位数','model_id' => 3,'type' => 'smallint','length' => 2,'decimal_length' => 0,'is_null' => 20,'note' => '表的字段为decimal类型时的小数位数','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 24,'status' => 10,],
253 | ['id' => 47,'field_name' => 'is_null','label' => '是否为空','model_id' => 3,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '是否为空:10=是,20=否','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 25,'status' => 10,],
254 | ['id' => 48,'field_name' => 'note','label' => '字段备注','model_id' => 3,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '表的字段备注说明','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 26,'status' => 10,],
255 | ['id' => 49,'field_name' => 'default_value','label' => '默认值','model_id' => 3,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '数据默认值','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 27,'status' => 10,],
256 | ['id' => 50,'field_name' => 'is_auto_increment','label' => '自动递增','model_id' => 3,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '是否自动递增:10=是,20=否','default_value' => '20','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 28,'status' => 10,],
257 | ['id' => 51,'field_name' => 'is_label','label' => '标题字段','model_id' => 3,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '是否为标题字段:10=是,20=否','default_value' => '20','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 29,'status' => 10,],
258 | ['id' => 52,'field_name' => 'is_signed','label' => '可为负数','model_id' => 3,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '是否可为负数:10=是,20=否','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 30,'status' => 10,],
259 | ['id' => 53,'field_name' => 'is_show','label' => '列表可显','model_id' => 3,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '默认列表中显示:10=显示,20=不显示','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 31,'status' => 10,],
260 | ['id' => 54,'field_name' => 'is_fixed','label' => '固定列','model_id' => 3,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '默认列表中固定:10=固定,20=不固定','default_value' => '20','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 32,'status' => 10,],
261 | ['id' => 55,'field_name' => 'column_width','label' => '列宽度','model_id' => 3,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '列表中默认显示宽度:0表示不限','default_value' => '150','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 33,'status' => 10,],
262 | ['id' => 56,'field_name' => 'is_filter','label' => '可筛选','model_id' => 3,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '列表中是否可为筛选条件:10=是,20=否','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 34,'status' => 10,],
263 | ['id' => 57,'field_name' => 'sort_num','label' => '排序','model_id' => 3,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '表单/列表中字段的排列顺序(小在前)','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 36,'status' => 10,],
264 | ['id' => 58,'field_name' => 'status','label' => '状态','model_id' => 3,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 37,'status' => 10,],
265 | ['id' => 60,'field_name' => 'id','label' => 'ID','model_id' => 4,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 37,'status' => 10,],
266 | ['id' => 61,'field_name' => 'type','label' => '类型','model_id' => 4,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '类型:10=内置,20=扩展','default_value' => '20','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 38,'status' => 10,],
267 | ['id' => 62,'field_name' => 'model_id','label' => '所属模型','model_id' => 4,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '所属模型ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 39,'status' => 10,],
268 | ['id' => 63,'field_name' => 'model_field_id','label' => '模型字段','model_id' => 4,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '模型字段ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 40,'status' => 10,],
269 | ['id' => 64,'field_name' => 'option_value','label' => '选项值','model_id' => 4,'type' => 'varchar','length' => 64,'decimal_length' => 0,'is_null' => 20,'note' => '选项值','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 41,'status' => 10,],
270 | ['id' => 65,'field_name' => 'option_label','label' => '选项标签','model_id' => 4,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '选项标签','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 42,'status' => 10,],
271 | ['id' => 66,'field_name' => 'status','label' => '状态','model_id' => 4,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 43,'status' => 10,],
272 | ['id' => 80,'field_name' => 'id','label' => 'ID','model_id' => 5,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 44,'status' => 10,],
273 | ['id' => 81,'field_name' => 'model_id','label' => '所属模型','model_id' => 5,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '所属模型ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 45,'status' => 10,],
274 | ['id' => 82,'field_name' => 'model_field_id','label' => '模型字段','model_id' => 5,'type' => 'varchar','length' => 100,'decimal_length' => 0,'is_null' => 20,'note' => '模型字段ID','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 46,'status' => 10,],
275 | ['id' => 83,'field_name' => 'index_type','label' => '索引类型','model_id' => 5,'type' => 'varchar','length' => 32,'decimal_length' => 0,'is_null' => 20,'note' => '索引类型: PRIMARY=主键,NORMAL=常规,UNIQUE=唯一,FULLTEXT=全文','default_value' => 'NORMAL','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 47,'status' => 10,],
276 | ['id' => 84,'field_name' => 'status','label' => '状态','model_id' => 5,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 48,'status' => 10,],
277 | ['id' => 100,'field_name' => 'id','label' => 'ID','model_id' => 6,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 49,'status' => 10,],
278 | ['id' => 101,'field_name' => 'model_id','label' => '所属模型','model_id' => 6,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '所属模型ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 50,'status' => 10,],
279 | ['id' => 102,'field_name' => 'model_field_id','label' => '模型字段','model_id' => 6,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '模型字段ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 51,'status' => 10,],
280 | ['id' => 103,'field_name' => 'relation_model_id','label' => '关联模型','model_id' => 6,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '关联模型ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 52,'status' => 10,],
281 | ['id' => 104,'field_name' => 'relation_field_id','label' => '关联模型字段','model_id' => 6,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '关联模型字段ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 53,'status' => 10,],
282 | ['id' => 105,'field_name' => 'relation_show_field_id','label' => '显示字段','model_id' => 6,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '关联模型显示字段ID,多个逗号分隔,全部用*','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 54,'status' => 10,],
283 | ['id' => 106,'field_name' => 'relation_filter','label' => '关联过滤条件','model_id' => 6,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '关联过滤条件','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 55,'status' => 10,],
284 | ['id' => 107,'field_name' => 'status','label' => '状态','model_id' => 6,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 56,'status' => 10,],
285 | ['id' => 120,'field_name' => 'id','label' => 'ID','model_id' => 7,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 20,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 56,'status' => 10,],
286 | ['id' => 121,'field_name' => 'title','label' => '菜单标题','model_id' => 7,'type' => 'varchar','length' => 64,'decimal_length' => 0,'is_null' => 20,'note' => '菜单标题','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 57,'status' => 10,],
287 | ['id' => 122,'field_name' => 'icon','label' => '菜单图标','model_id' => 7,'type' => 'varchar','length' => 32,'decimal_length' => 0,'is_null' => 20,'note' => '菜单图标','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 58,'status' => 10,],
288 | ['id' => 123,'field_name' => 'pid','label' => '父级','model_id' => 7,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '父级ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 20,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 59,'status' => 10,],
289 | ['id' => 124,'field_name' => 'app_id','label' => '应用','model_id' => 7,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '应用ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 60,'status' => 10,],
290 | ['id' => 125,'field_name' => 'id_path','label' => 'ID路径','model_id' => 7,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => 'ID路径,英文逗号分隔','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 61,'status' => 10,],
291 | ['id' => 126,'field_name' => 'path_name','label' => '菜单路径','model_id' => 7,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '菜单路径,英文逗号分隔','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 62,'status' => 10,],
292 | ['id' => 127,'field_name' => 'model_id','label' => '模型','model_id' => 7,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '模型ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 63,'status' => 10,],
293 | ['id' => 128,'field_name' => 'type','label' => '类型','model_id' => 7,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '类型:10=内置,20=扩展','default_value' => '20','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 64,'status' => 10,],
294 | ['id' => 129,'field_name' => 'sort_num','label' => '排序','model_id' => 7,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '菜单的排列顺序(小在前)','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 65,'status' => 10,],
295 | ['id' => 130,'field_name' => 'status','label' => '状态','model_id' => 7,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 66,'status' => 10,],
296 | ['id' => 140,'field_name' => 'id','label' => 'ID','model_id' => 8,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 67,'status' => 10,],
297 | ['id' => 141,'field_name' => 'username','label' => '用户名','model_id' => 8,'type' => 'varchar','length' => 32,'decimal_length' => 0,'is_null' => 20,'note' => '用户名','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 68,'status' => 10,],
298 | ['id' => 142,'field_name' => 'password','label' => '密码','model_id' => 8,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '密码','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 20,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 69,'status' => 10,],
299 | ['id' => 143,'field_name' => 'email','label' => '邮箱','model_id' => 8,'type' => 'varchar','length' => 64,'decimal_length' => 0,'is_null' => 20,'note' => '邮箱','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 70,'status' => 10,],
300 | ['id' => 144,'field_name' => 'mobile','label' => '手机','model_id' => 8,'type' => 'varchar','length' => 32,'decimal_length' => 0,'is_null' => 20,'note' => '手机','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 71,'status' => 10,],
301 | ['id' => 145,'field_name' => 'is_super','label' => '超级管理员','model_id' => 8,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '超级管理员:10=是,20=否','default_value' => '20','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 72,'status' => 10,],
302 | ['id' => 146,'field_name' => 'reg_time','label' => '注册时间','model_id' => 8,'type' => 'timestamp','length' => 0,'decimal_length' => 0,'is_null' => 20,'note' => '注册时间','default_value' => 'CURRENT_TIMESTAMP','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 73,'status' => 10,],
303 | ['id' => 147,'field_name' => 'reg_ip','label' => '注册IP','model_id' => 8,'type' => 'varchar','length' => 24,'decimal_length' => 0,'is_null' => 20,'note' => '注册IP','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 74,'status' => 10,],
304 | ['id' => 148,'field_name' => 'last_login_time','label' => '最后登录时间','model_id' => 8,'type' => 'timestamp','length' => 0,'decimal_length' => 0,'is_null' => 20,'note' => '最后登录时间','default_value' => 'CURRENT_TIMESTAMP','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 75,'status' => 10,],
305 | ['id' => 149,'field_name' => 'last_login_ip','label' => '最后登录IP','model_id' => 8,'type' => 'varchar','length' => 24,'decimal_length' => 0,'is_null' => 20,'note' => '最后登录IP','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 76,'status' => 10,],
306 | ['id' => 150,'field_name' => 'update_time','label' => '更新时间','model_id' => 8,'type' => 'timestamp','length' => 0,'decimal_length' => 0,'is_null' => 20,'note' => '更新时间','default_value' => 'CURRENT_TIMESTAMP','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 77,'status' => 10,],
307 | ['id' => 151,'field_name' => 'token','label' => '访问token','model_id' => 8,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => 'api访问token','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 78,'status' => 10,],
308 | ['id' => 152,'field_name' => 'status','label' => '状态','model_id' => 8,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 79,'status' => 10,],
309 | ['id' => 160,'field_name' => 'id','label' => 'ID','model_id' => 9,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 80,'status' => 10,],
310 | ['id' => 161,'field_name' => 'model_id','label' => '所属模型','model_id' => 9,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '所属模型ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 81,'status' => 10,],
311 | ['id' => 162,'field_name' => 'model_field_id','label' => '模型字段','model_id' => 9,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '模型字段ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 82,'status' => 10,],
312 | ['id' => 163,'field_name' => 'type','label' => '控件类型','model_id' => 9,'type' => 'varchar','length' => 32,'decimal_length' => 0,'is_null' => 20,'note' => '表单控件类型','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 83,'status' => 10,],
313 | ['id' => 164,'field_name' => 'default_value','label' => '控件默认值','model_id' => 9,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '表单控件默认值','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 84,'status' => 10,],
314 | ['id' => 165,'field_name' => 'is_disabled','label' => '是否禁用','model_id' => 9,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '添加/编辑表单中是否禁用: 10=是,20=否','default_value' => '20','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 85,'status' => 10,],
315 | ['id' => 166,'field_name' => 'sort_num','label' => '排序','model_id' => 9,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '菜单的排列顺序(小在前)','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 86,'status' => 10,],
316 | ['id' => 167,'field_name' => 'status','label' => '状态','model_id' => 9,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 87,'status' => 10,],
317 | ['id' => 180,'field_name' => 'id','label' => 'ID','model_id' => 10,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 88,'status' => 10,],
318 | ['id' => 181,'field_name' => 'model_id','label' => '所属模型','model_id' => 10,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '所属模型ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 89,'status' => 10,],
319 | ['id' => 182,'field_name' => 'model_form_id','label' => '模型表单','model_id' => 10,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '模型表单ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 90,'status' => 10,],
320 | ['id' => 183,'field_name' => 'rule_type','label' => '验证类型','model_id' => 10,'type' => 'varchar','length' => 32,'decimal_length' => 0,'is_null' => 20,'note' => '表单验证类型','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 91,'status' => 10,],
321 | ['id' => 184,'field_name' => 'rule_value','label' => '验证规则','model_id' => 10,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '表单验证规则','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 92,'status' => 10,],
322 | ['id' => 185,'field_name' => 'error_tips','label' => '错误提示','model_id' => 10,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '表单验证不通过的错误提示信息','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 93,'status' => 10,],
323 | ['id' => 186,'field_name' => 'status','label' => '状态','model_id' => 10,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 94,'status' => 10,],
324 | ['id' => 200,'field_name' => 'id','label' => 'ID','model_id' => 11,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 95,'status' => 10,],
325 | ['id' => 201,'field_name' => 'role_name','label' => '角色名称','model_id' => 11,'type' => 'varchar','length' => 64,'decimal_length' => 0,'is_null' => 20,'note' => '用户的角色名称','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 96,'status' => 10,],
326 | ['id' => 203,'field_name' => 'pid','label' => '父级','model_id' => 11,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '父级ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 98,'status' => 10,],
327 | ['id' => 204,'field_name' => 'id_path','label' => '层级路径','model_id' => 11,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '角色ID层级路径','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 99,'status' => 10,],
328 | ['id' => 205,'field_name' => 'remark','label' => '备注','model_id' => 11,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '角色的备注信息','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 100,'status' => 10,],
329 | ['id' => 206,'field_name' => 'status','label' => '状态','model_id' => 11,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 101,'status' => 10,],
330 | ['id' => 220,'field_name' => 'id','label' => 'ID','model_id' => 12,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 102,'status' => 10,],
331 | ['id' => 221,'field_name' => 'model_id','label' => '所属模型','model_id' => 12,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '所属模型ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 103,'status' => 10,],
332 | ['id' => 222,'field_name' => 'model_field_id','label' => '模型字段','model_id' => 12,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '模型字段ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 104,'status' => 10,],
333 | ['id' => 223,'field_name' => 'linkage_field_id','label' => '联动字段','model_id' => 12,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '联动表单的字段ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 105,'status' => 10,],
334 | ['id' => 224,'field_name' => 'linkage_action_id','label' => '联动动作','model_id' => 12,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '获取联动表单数据的动作ID','default_value' => '0','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 106,'status' => 10,],
335 | ['id' => 225,'field_name' => 'status','label' => '状态','model_id' => 12,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 107,'status' => 10,],
336 | ['id' => 240,'field_name' => 'id','label' => 'ID','model_id' => 14,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '自增ID','default_value' => '0','is_auto_increment' => 10,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 109,'status' => 10,],
337 | ['id' => 241,'field_name' => 'app_name','label' => '应用名称','model_id' => 14,'type' => 'varchar','length' => 64,'decimal_length' => 0,'is_null' => 20,'note' => '应用名称','default_value' => '','is_auto_increment' => 20,'is_label' => 10,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 110,'status' => 10,],
338 | ['id' => 242,'field_name' => 'login_enable','label' => '登录验证','model_id' => 14,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '是否开启登录验证, 10=是,20=否','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 111,'status' => 10,],
339 | ['id' => 243,'field_name' => 'auth_enable','label' => '权限验证','model_id' => 14,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '是否开启权限验证, 10=是,20=否','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 112,'status' => 10,],
340 | ['id' => 244,'field_name' => 'exclusion_url','label' => '排除验证URL','model_id' => 14,'type' => 'varchar','length' => 2000,'decimal_length' => 0,'is_null' => 20,'note' => '排除验证的URL,多个用英文逗号分隔','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 113,'status' => 10,],
341 | ['id' => 245,'field_name' => 'type','label' => '类型','model_id' => 14,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '类型:10=内置,20=扩展','default_value' => '20','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 10,'sort_num' => 114,'status' => 10,],
342 | ['id' => 246,'field_name' => 'status','label' => '状态','model_id' => 14,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '状态:10=开启,20=禁用','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 115,'status' => 10,],
343 | ['id' => 247,'field_name' => 'is_code','label' => '显示源码','model_id' => 3,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '是否显示文本源码,10=是,20=否','default_value' => '20','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 34,'status' => 10,],
344 | ['id' => 260,'field_name' => 'pid','label' => '父级用户','model_id' => 8,'type' => 'int','length' => 11,'decimal_length' => 0,'is_null' => 20,'note' => '父级用户ID','default_value' => 0,'is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 20,'is_fixed' => 20,'column_width' => 100,'is_filter' => 20,'sort_num' => 0,'status' => 10,],
345 | ['id' => 261,'field_name' => 'placeholder','label' => '表单提示','model_id' => 9,'type' => 'varchar','length' => 255,'decimal_length' => 0,'is_null' => 20,'note' => '表单提示信息','default_value' => '','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 150,'is_filter' => 20,'sort_num' => 88,'status' => 10,],
346 | ['id' => 262,'field_name' => 'is_edit','label' => '可编辑','model_id' => 9,'type' => 'smallint','length' => 4,'decimal_length' => 0,'is_null' => 20,'note' => '可编辑:10=是,20=否','default_value' => '10','is_auto_increment' => 20,'is_label' => 20,'is_signed' => 20,'is_show' => 10,'is_fixed' => 20,'column_width' => 100,'is_filter' => 10,'sort_num' => 89,'status' => 10,],
347 | ];
348 | $this->table('model_field')->insert($data)->save();
349 |
350 | //model_index索引表
351 | $data = [
352 | ['model_id' => 1,'model_field_id' => '3','index_type' => 'UNIQUE',],
353 | ['model_id' => 2,'model_field_id' => '23,24','index_type' => 'UNIQUE',],
354 | ['model_id' => 3,'model_field_id' => '41,43','index_type' => 'UNIQUE',],
355 | ['model_id' => 4,'model_field_id' => '63,64','index_type' => 'UNIQUE',],
356 | ['model_id' => 6,'model_field_id' => '102,104','index_type' => 'UNIQUE',],
357 | ['model_id' => 8,'model_field_id' => '141','index_type' => 'UNIQUE',],
358 | ['model_id' => 8,'model_field_id' => '143','index_type' => 'UNIQUE',],
359 | ['model_id' => 8,'model_field_id' => '144','index_type' => 'UNIQUE',],
360 | ['model_id' => 9,'model_field_id' => '162','index_type' => 'UNIQUE',],
361 | ['model_id' => 11,'model_field_id' => '201','index_type' => 'UNIQUE',],
362 | ['model_id' => 12,'model_field_id' => '222,223','index_type' => 'UNIQUE',],
363 | ['model_id' => 14,'model_field_id' => '241','index_type' => 'UNIQUE',],
364 | ];
365 | $this->table('model_index')->insert($data)->save();
366 |
367 | //field_option 字段选项表
368 | $data = [
369 | ['model_id' => 1,'model_field_id' => 5,'type' => 10,'option_value' => 'template/content/List','option_label' => '列表组件',],
370 | ['model_id' => 1,'model_field_id' => 8,'type' => 10,'option_value' => '10','option_label' => '内置',],
371 | ['model_id' => 1,'model_field_id' => 8,'type' => 10,'option_value' => '20','option_label' => '扩展',],
372 | ['model_id' => 1,'model_field_id' => 9,'type' => 10,'option_value' => '10','option_label' => '是',],
373 | ['model_id' => 1,'model_field_id' => 9,'type' => 10,'option_value' => '20','option_label' => '否',],
374 | ['model_id' => 1,'model_field_id' => 11,'type' => 10,'option_value' => '10','option_label' => '开启',],
375 | ['model_id' => 1,'model_field_id' => 11,'type' => 10,'option_value' => '20','option_label' => '禁用',],
376 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'action_list','option_label' => '获取动作列表',],
377 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'list','option_label' => '列表',],
378 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'detail','option_label' => '详情',],
379 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'save','option_label' => '保存',],
380 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'save_all','option_label' => '批量保存',],
381 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'delete','option_label' => '删除',],
382 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'delete_batch','option_label' => '批量删除',],
383 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'dropdown','option_label' => '下拉列表',],
384 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'add_permission','option_label' => '设置角色权限',],
385 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'assign_role','option_label' => '分配角色',],
386 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'assign_users','option_label' => '批量分配用户',],
387 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'del_permission','option_label' => '删除角色权限',],
388 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'del_users','option_label' => '批量删除用户',],
389 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'get_all_roles','option_label' => '获取所有角色',],
390 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'get_all_users','option_label' => '获取所有用户',],
391 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'get_permission','option_label' => '获取角色下所有权限',],
392 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'get_roles','option_label' => '获取用户的角色',],
393 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'get_users','option_label' => '获取角色下所有用户',],
394 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'get_user_permission','option_label' => '获取用户权限',],
395 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'set_user_permission','option_label' => '设置用户权限',],
396 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'login','option_label' => '登录后台',],
397 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'logout','option_label' => '退出系统',],
398 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'nav','option_label' => '导航菜单',],
399 | ['model_id' => 2,'model_field_id' => 24,'type' => 10,'option_value' => 'upload','option_label' => '上传文件',],
400 | ['model_id' => 2,'model_field_id' => 25,'type' => 10,'option_value' => '10','option_label' => '开启',],
401 | ['model_id' => 2,'model_field_id' => 25,'type' => 10,'option_value' => '20','option_label' => '禁用',],
402 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'char','option_label' => '固定长度字符串',],
403 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'varchar','option_label' => '可变长度字符串',],
404 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'text','option_label' => '多行文本',],
405 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'mediumtext','option_label' => '中型多行文本',],
406 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'longtext','option_label' => '大型多行文本',],
407 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'tinyint','option_label' => '小型数值',],
408 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'smallint','option_label' => '中型数值',],
409 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'int','option_label' => '大型数值',],
410 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'bigint','option_label' => '越大型数值',],
411 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'float','option_label' => '单精度浮点型',],
412 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'double','option_label' => '双精度浮点型',],
413 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'decimal','option_label' => '金额型',],
414 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'date','option_label' => '日期',],
415 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'datetime','option_label' => '日期时间',],
416 | ['model_id' => 3,'model_field_id' => 44,'type' => 10,'option_value' => 'timestamp','option_label' => '日期时间',],
417 | ['model_id' => 3,'model_field_id' => 47,'type' => 10,'option_value' => '10','option_label' => '是',],
418 | ['model_id' => 3,'model_field_id' => 47,'type' => 10,'option_value' => '20','option_label' => '否',],
419 | ['model_id' => 3,'model_field_id' => 50,'type' => 10,'option_value' => '10','option_label' => '是',],
420 | ['model_id' => 3,'model_field_id' => 50,'type' => 10,'option_value' => '20','option_label' => '否',],
421 | ['model_id' => 3,'model_field_id' => 51,'type' => 10,'option_value' => '10','option_label' => '是',],
422 | ['model_id' => 3,'model_field_id' => 51,'type' => 10,'option_value' => '20','option_label' => '否',],
423 | ['model_id' => 3,'model_field_id' => 52,'type' => 10,'option_value' => '10','option_label' => '是',],
424 | ['model_id' => 3,'model_field_id' => 52,'type' => 10,'option_value' => '20','option_label' => '否',],
425 | ['model_id' => 3,'model_field_id' => 53,'type' => 10,'option_value' => '10','option_label' => '显示',],
426 | ['model_id' => 3,'model_field_id' => 53,'type' => 10,'option_value' => '20','option_label' => '不显示',],
427 | ['model_id' => 3,'model_field_id' => 54,'type' => 10,'option_value' => '10','option_label' => '固定',],
428 | ['model_id' => 3,'model_field_id' => 54,'type' => 10,'option_value' => '20','option_label' => '不固定',],
429 | ['model_id' => 3,'model_field_id' => 56,'type' => 10,'option_value' => '10','option_label' => '是',],
430 | ['model_id' => 3,'model_field_id' => 56,'type' => 10,'option_value' => '20','option_label' => '否',],
431 | ['model_id' => 3,'model_field_id' => 58,'type' => 10,'option_value' => '10','option_label' => '开启',],
432 | ['model_id' => 3,'model_field_id' => 58,'type' => 10,'option_value' => '20','option_label' => '禁用',],
433 | ['model_id' => 3,'model_field_id' => 247,'type' => 10,'option_value' => '10','option_label' => '是',],
434 | ['model_id' => 3,'model_field_id' => 247,'type' => 10,'option_value' => '20','option_label' => '否',],
435 | ['model_id' => 4,'model_field_id' => 61,'type' => 10,'option_value' => '10','option_label' => '内置',],
436 | ['model_id' => 4,'model_field_id' => 61,'type' => 10,'option_value' => '20','option_label' => '扩展',],
437 | ['model_id' => 4,'model_field_id' => 66,'type' => 10,'option_value' => '10','option_label' => '开启',],
438 | ['model_id' => 4,'model_field_id' => 66,'type' => 10,'option_value' => '20','option_label' => '禁用',],
439 | ['model_id' => 5,'model_field_id' => 83,'type' => 10,'option_value' => 'NORMAL','option_label' => '常规',],
440 | ['model_id' => 5,'model_field_id' => 83,'type' => 10,'option_value' => 'UNIQUE','option_label' => '唯一',],
441 | ['model_id' => 5,'model_field_id' => 83,'type' => 10,'option_value' => 'FULLTEXT','option_label' => '全文',],
442 | ['model_id' => 5,'model_field_id' => 84,'type' => 10,'option_value' => '10','option_label' => '开启',],
443 | ['model_id' => 5,'model_field_id' => 84,'type' => 10,'option_value' => '20','option_label' => '禁用',],
444 | ['model_id' => 6,'model_field_id' => 107,'type' => 10,'option_value' => '10','option_label' => '开启',],
445 | ['model_id' => 6,'model_field_id' => 107,'type' => 10,'option_value' => '20','option_label' => '禁用',],
446 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'map-location','option_label' => '定位',],
447 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'coordinate','option_label' => '坐标',],
448 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'alarm-clock','option_label' => '闹钟',],
449 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'clock','option_label' => '时钟',],
450 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'calendar','option_label' => '日历',],
451 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'apple','option_label' => '苹果',],
452 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'pear','option_label' => '梨子',],
453 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'orange','option_label' => '桔子',],
454 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'cherry','option_label' => '樱桃',],
455 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'grape','option_label' => '葡萄',],
456 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'watermelon','option_label' => '西瓜',],
457 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'burger','option_label' => '汉堡包',],
458 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'dessert','option_label' => '甜点',],
459 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'fries','option_label' => '薯条',],
460 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'ice-cream','option_label' => '冰淇淋',],
461 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'milk-tea','option_label' => '奶茶',],
462 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'lollipop','option_label' => '棒棒糖',],
463 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'sugar','option_label' => '糖果',],
464 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'food','option_label' => '食物',],
465 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'fork-spoon','option_label' => '叉勺',],
466 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'coffee-cup','option_label' => '咖啡杯',],
467 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'goblet','option_label' => '高脚杯',],
468 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'mug','option_label' => '杯子',],
469 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'bowl','option_label' => '碗',],
470 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'arrow-left','option_label' => '左箭头',],
471 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'arrow-right','option_label' => '右箭头',],
472 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'avatar','option_label' => '头像',],
473 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'user','option_label' => '用户',],
474 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'male','option_label' => '男',],
475 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'female','option_label' => '女',],
476 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'bell','option_label' => '铃',],
477 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'basketball','option_label' => '篮球',],
478 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'bicycle','option_label' => '自行车',],
479 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'ship','option_label' => '船',],
480 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'van','option_label' => '货车',],
481 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'box','option_label' => '箱子',],
482 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'briefcase','option_label' => '公文包',],
483 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'suitcase','option_label' => '手提箱',],
484 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'brush','option_label' => '刷子',],
485 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'camera','option_label' => '相机',],
486 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'video-camera','option_label' => '摄像机',],
487 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'cellphone','option_label' => '手机',],
488 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'phone','option_label' => '电话',],
489 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'headset','option_label' => '耳机',],
490 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'watch','option_label' => '手表',],
491 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'cpu','option_label' => 'CPU',],
492 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'microphone','option_label' => '麦克风',],
493 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'monitor','option_label' => '显示器',],
494 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'mouse','option_label' => '鼠标',],
495 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'printer','option_label' => '打印机',],
496 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'picture','option_label' => '图片',],
497 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'film','option_label' => '电影',],
498 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'video-play','option_label' => '播放',],
499 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'video-pause','option_label' => '暂停',],
500 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'chat-dot-round','option_label' => '聊天',],
501 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'circle-check','option_label' => '打钩',],
502 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'circle-close','option_label' => '打叉',],
503 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'circle-plus','option_label' => '圆形加号',],
504 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'umbrella','option_label' => '雨伞',],
505 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'mostly-cloudy','option_label' => '云朵',],
506 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'wind-power','option_label' => '风力',],
507 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'lightning','option_label' => '闪电',],
508 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'sunny','option_label' => '太阳',],
509 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'moon','option_label' => '月亮',],
510 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'star','option_label' => '星星',],
511 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'money','option_label' => '钞票',],
512 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'coin','option_label' => '硬币',],
513 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'credit-card','option_label' => '信用卡',],
514 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'wallet','option_label' => '钱包',],
515 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'discount','option_label' => '折扣',],
516 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'goods','option_label' => '购物袋',],
517 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'shopping-cart','option_label' => '购物车',],
518 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'price-tag','option_label' => '价格标签',],
519 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'collection-tag','option_label' => '收藏标签',],
520 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'compass','option_label' => '指南针',],
521 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'connection','option_label' => '连接',],
522 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'link','option_label' => '超链接',],
523 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'scissor','option_label' => '剪切',],
524 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'copy-document','option_label' => '复制',],
525 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'delete','option_label' => '删除',],
526 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'rank','option_label' => '移动',],
527 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'crop','option_label' => '裁切',],
528 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'edit','option_label' => '编辑',],
529 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'filter','option_label' => '过滤',],
530 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'upload','option_label' => '上传',],
531 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'download','option_label' => '下载',],
532 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'finished','option_label' => '完成',],
533 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'document','option_label' => '文档',],
534 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'folder','option_label' => '文件夹',],
535 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'data-analysis','option_label' => '数据分析',],
536 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'histogram','option_label' => '直方图',],
537 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'trend-charts','option_label' => '折线图',],
538 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'pie-chart','option_label' => '饼图',],
539 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'flag','option_label' => '旗帜',],
540 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'full-screen','option_label' => '全屏',],
541 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'grid','option_label' => '网格',],
542 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'guide','option_label' => '路标',],
543 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'help','option_label' => '帮助',],
544 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'view','option_label' => '展示',],
545 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'hide','option_label' => '隐藏',],
546 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'list','option_label' => '列表',],
547 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'house','option_label' => '房子',],
548 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'office-building','option_label' => '办公楼',],
549 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'school','option_label' => '学校',],
550 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'shop','option_label' => '商店',],
551 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'key','option_label' => '钥匙',],
552 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'lock','option_label' => '锁',],
553 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'management','option_label' => '管理',],
554 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'magnet','option_label' => '磁铁',],
555 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'medal','option_label' => '奖章',],
556 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'menu','option_label' => '菜单',],
557 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'message-box','option_label' => '消息盒子',],
558 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'message','option_label' => '信封',],
559 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'postcard','option_label' => '明信片',],
560 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'notebook','option_label' => '笔记本',],
561 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'info-filled','option_label' => '信息',],
562 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'warning-filled','option_label' => '警告',],
563 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'notification','option_label' => '通知',],
564 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'question-filled','option_label' => '问号',],
565 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'odometer','option_label' => '里程计',],
566 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'more','option_label' => '更多',],
567 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'operation','option_label' => '操作',],
568 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'opportunity','option_label' => '机会',],
569 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'paperclip','option_label' => '回形针',],
570 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'present','option_label' => '当前',],
571 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'reading','option_label' => '阅读',],
572 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'search','option_label' => '放大镜',],
573 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'zoom-in','option_label' => '放大镜+',],
574 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'zoom-out','option_label' => '放大镜-',],
575 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'setting','option_label' => '齿轮',],
576 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'share','option_label' => '分享',],
577 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'sort','option_label' => '排序',],
578 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'stamp','option_label' => '图章',],
579 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'switch-button','option_label' => '开关',],
580 | ['model_id' => 7,'model_field_id' => 122,'type' => 10,'option_value' => 'takeaway-box','option_label' => '任务',],
581 | ['model_id' => 7,'model_field_id' => 128,'type' => 10,'option_value' => '10','option_label' => '内置',],
582 | ['model_id' => 7,'model_field_id' => 128,'type' => 10,'option_value' => '20','option_label' => '扩展',],
583 | ['model_id' => 7,'model_field_id' => 130,'type' => 10,'option_value' => '10','option_label' => '开启',],
584 | ['model_id' => 7,'model_field_id' => 130,'type' => 10,'option_value' => '20','option_label' => '禁用',],
585 | ['model_id' => 8,'model_field_id' => 145,'type' => 10,'option_value' => '10','option_label' => '是',],
586 | ['model_id' => 8,'model_field_id' => 145,'type' => 10,'option_value' => '20','option_label' => '否',],
587 | ['model_id' => 8,'model_field_id' => 152,'type' => 10,'option_value' => '10','option_label' => '开启',],
588 | ['model_id' => 8,'model_field_id' => 152,'type' => 10,'option_value' => '20','option_label' => '禁用',],
589 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'text','option_label' => '文本输入框',],
590 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'textarea','option_label' => '多行文本输入框',],
591 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'radio','option_label' => '单选框',],
592 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'password','option_label' => '密码框',],
593 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'checkbox','option_label' => '多选框',],
594 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'input_number','option_label' => '计数器',],
595 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'select','option_label' => '单选下拉框',],
596 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'select_mul','option_label' => '多选下拉框',],
597 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'switch','option_label' => '开关',],
598 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'date','option_label' => '日期日历',],
599 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'datetime','option_label' => '日期时间日历',],
600 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'upload_image','option_label' => '图片上传',],
601 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'upload_file','option_label' => '文件上传',],
602 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'editor','option_label' => '编辑器',],
603 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'hidden','option_label' => '隐藏域',],
604 | ['model_id' => 9,'model_field_id' => 163,'type' => 10,'option_value' => 'color_picker','option_label' => '颜色选择器',],
605 | ['model_id' => 9,'model_field_id' => 165,'type' => 10,'option_value' => '10','option_label' => '是',],
606 | ['model_id' => 9,'model_field_id' => 165,'type' => 10,'option_value' => '20','option_label' => '否',],
607 | ['model_id' => 9,'model_field_id' => 167,'type' => 10,'option_value' => '10','option_label' => '开启',],
608 | ['model_id' => 9,'model_field_id' => 167,'type' => 10,'option_value' => '20','option_label' => '禁用',],
609 | ['model_id' => 9,'model_field_id' => 262,'type' => 10,'option_value' => '10','option_label' => '是',],
610 | ['model_id' => 9,'model_field_id' => 262,'type' => 10,'option_value' => '20','option_label' => '否',],
611 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'require','option_label' => '必填',],
612 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'number','option_label' => '纯数字(不包负数和小数点)',],
613 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'integer','option_label' => '整数',],
614 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'float','option_label' => '浮点数',],
615 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'boolean','option_label' => '布尔值',],
616 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'email','option_label' => '邮箱',],
617 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'array','option_label' => '数组',],
618 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'accepted','option_label' => '是否为(yes,on,或是1)',],
619 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'date','option_label' => '日期',],
620 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'alpha','option_label' => '纯字母',],
621 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'alphaNum','option_label' => '字母和数字',],
622 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'alphaDash','option_label' => '字母和数字,下划线_及破折号-',],
623 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'chs','option_label' => '纯汉字',],
624 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'chsAlpha','option_label' => '汉字、字母',],
625 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'chsAlphaNum','option_label' => '汉字、字母和数字',],
626 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'chsDash','option_label' => '汉字、字母、数字和下划线_及破折号-',],
627 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'cntrl','option_label' => '换行、缩进、空格',],
628 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'graph','option_label' => '可打印字符(空格除外)',],
629 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'print','option_label' => '可打印字符(包括空格)',],
630 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'lower','option_label' => '小写字符',],
631 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'upper','option_label' => '大写字符',],
632 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'space','option_label' => '空白字符(包括缩进,垂直制表符,换行符,回车和换页字符)',],
633 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'xdigit','option_label' => '十六进制字符串',],
634 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'activeUrl','option_label' => '域名或者IP',],
635 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'url','option_label' => 'URL地址',],
636 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'ip','option_label' => 'IP地址',],
637 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'dateFormat','option_label' => '指定格式的日期',],
638 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'mobile','option_label' => '手机号码',],
639 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'idCard','option_label' => '身份证号码',],
640 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'macAddr','option_label' => 'MAC地址',],
641 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'zip','option_label' => '邮政编码',],
642 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'in','option_label' => '在某个范围',],
643 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'notIn','option_label' => '不在某个范围',],
644 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'between','option_label' => '在某个区间',],
645 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'notBetween','option_label' => '不在某个范围',],
646 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'length','option_label' => '长度是否在某个范围',],
647 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'max','option_label' => '最大长度',],
648 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'min','option_label' => '最小长度',],
649 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'after','option_label' => '在某个日期之后',],
650 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'before','option_label' => '在某个日期之前',],
651 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'expire','option_label' => '在某个有效日期之内',],
652 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'allowIp','option_label' => 'IP是否在某个范围(多个IP用逗号分隔)',],
653 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'denyIp','option_label' => 'IP是否禁止(多个IP用逗号分隔)',],
654 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'confirm','option_label' => '和另外一个字段的值一致',],
655 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'different','option_label' => '和另外一个字段的值不一致',],
656 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => '=','option_label' => '等于某个值',],
657 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => '>=','option_label' => '大于等于某个值',],
658 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => '>','option_label' => '大于某个值',],
659 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => '<=','option_label' => '小于等于某个值',],
660 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => '<','option_label' => '小于某个值',],
661 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'filter','option_label' => '支持使用filter_var进行验证',],
662 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'regex','option_label' => '正则验证',],
663 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'file','option_label' => '文件',],
664 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'image','option_label' => '图像文件',],
665 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'fileExt','option_label' => '上传文件后缀',],
666 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'fileMime','option_label' => '上传文件类型',],
667 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'fileSize','option_label' => '上传文件大小',],
668 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'token','option_label' => '表单令牌',],
669 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'unique','option_label' => '请求的字段值是否为唯一',],
670 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'requireIf','option_label' => '某个字段的值等于某个值的时候必须',],
671 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'requireWith','option_label' => '某个字段有值的时候必须',],
672 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'requireWithout','option_label' => '某个字段没有值的时候必须',],
673 | ['model_id' => 10,'model_field_id' => 183,'type' => 10,'option_value' => 'requireCallback','option_label' => '某个callable为真的时候字段必须',],
674 | ['model_id' => 10,'model_field_id' => 186,'type' => 10,'option_value' => '10','option_label' => '开启',],
675 | ['model_id' => 10,'model_field_id' => 186,'type' => 10,'option_value' => '20','option_label' => '禁用',],
676 | ['model_id' => 11,'model_field_id' => 206,'type' => 10,'option_value' => '10','option_label' => '开启',],
677 | ['model_id' => 11,'model_field_id' => 206,'type' => 10,'option_value' => '20','option_label' => '禁用',],
678 | ['model_id' => 12,'model_field_id' => 225,'type' => 10,'option_value' => '10','option_label' => '开启',],
679 | ['model_id' => 12,'model_field_id' => 225,'type' => 10,'option_value' => '20','option_label' => '禁用',],
680 | ['model_id' => 14,'model_field_id' => 242,'type' => 10,'option_value' => '10','option_label' => '是',],
681 | ['model_id' => 14,'model_field_id' => 242,'type' => 10,'option_value' => '20','option_label' => '否',],
682 | ['model_id' => 14,'model_field_id' => 243,'type' => 10,'option_value' => '10','option_label' => '是',],
683 | ['model_id' => 14,'model_field_id' => 243,'type' => 10,'option_value' => '20','option_label' => '否',],
684 | ['model_id' => 14,'model_field_id' => 245,'type' => 10,'option_value' => '10','option_label' => '内置',],
685 | ['model_id' => 14,'model_field_id' => 245,'type' => 10,'option_value' => '20','option_label' => '扩展',],
686 | ['model_id' => 14,'model_field_id' => 246,'type' => 10,'option_value' => '10','option_label' => '开启',],
687 | ['model_id' => 14,'model_field_id' => 246,'type' => 10,'option_value' => '20','option_label' => '禁用',],
688 |
689 | ];
690 | $this->table('field_option')->insert($data)->save();
691 |
692 | //model_relation 模型关联表
693 | $data = [
694 | ['model_id' => 1,'model_field_id' => 2,'relation_model_id' => 14,'relation_field_id' => 240,'relation_show_field_id' => '241','relation_filter' => '',],
695 | ['model_id' => 1,'model_field_id' => 6,'relation_model_id' => 2,'relation_field_id' => 20,'relation_show_field_id' => '21','relation_filter' => '',],
696 | ['model_id' => 1,'model_field_id' => 7,'relation_model_id' => 3,'relation_field_id' => 40,'relation_show_field_id' => '41,42','relation_filter' => '',],
697 | ['model_id' => 2,'model_field_id' => 23,'relation_model_id' => 1,'relation_field_id' => 1,'relation_show_field_id' => '3,4','relation_filter' => '',],
698 | ['model_id' => 3,'model_field_id' => 43,'relation_model_id' => 1,'relation_field_id' => 1,'relation_show_field_id' => '3,4','relation_filter' => '',],
699 | ['model_id' => 4,'model_field_id' => 62,'relation_model_id' => 1,'relation_field_id' => 1,'relation_show_field_id' => '3,4','relation_filter' => '',],
700 | ['model_id' => 4,'model_field_id' => 63,'relation_model_id' => 3,'relation_field_id' => 40,'relation_show_field_id' => '41,42','relation_filter' => '',],
701 | ['model_id' => 5,'model_field_id' => 81,'relation_model_id' => 1,'relation_field_id' => 1,'relation_show_field_id' => '3,4','relation_filter' => '',],
702 | ['model_id' => 5,'model_field_id' => 82,'relation_model_id' => 3,'relation_field_id' => 40,'relation_show_field_id' => '41,42','relation_filter' => '',],
703 | ['model_id' => 6,'model_field_id' => 101,'relation_model_id' => 1,'relation_field_id' => 1,'relation_show_field_id' => '3,4','relation_filter' => '',],
704 | ['model_id' => 6,'model_field_id' => 102,'relation_model_id' => 3,'relation_field_id' => 40,'relation_show_field_id' => '41,42','relation_filter' => '',],
705 | ['model_id' => 6,'model_field_id' => 103,'relation_model_id' => 1,'relation_field_id' => 1,'relation_show_field_id' => '3,4','relation_filter' => '',],
706 | ['model_id' => 6,'model_field_id' => 104,'relation_model_id' => 3,'relation_field_id' => 40,'relation_show_field_id' => '41,42','relation_filter' => '',],
707 | ['model_id' => 6,'model_field_id' => 105,'relation_model_id' => 3,'relation_field_id' => 40,'relation_show_field_id' => '41,42','relation_filter' => '',],
708 | ['model_id' => 7,'model_field_id' => 127,'relation_model_id' => 1,'relation_field_id' => 1,'relation_show_field_id' => '3,4','relation_filter' => '',],
709 | ['model_id' => 7,'model_field_id' => 124,'relation_model_id' => 14,'relation_field_id' => 240,'relation_show_field_id' => '241','relation_filter' => '',],
710 | ['model_id' => 9,'model_field_id' => 161,'relation_model_id' => 1,'relation_field_id' => 1,'relation_show_field_id' => '3,4','relation_filter' => '',],
711 | ['model_id' => 9,'model_field_id' => 162,'relation_model_id' => 3,'relation_field_id' => 40,'relation_show_field_id' => '41,42','relation_filter' => '',],
712 | ['model_id' => 10,'model_field_id' => 181,'relation_model_id' => 1,'relation_field_id' => 1,'relation_show_field_id' => '3,4','relation_filter' => '',],
713 | ['model_id' => 10,'model_field_id' => 182,'relation_model_id' => 9,'relation_field_id' => 160,'relation_show_field_id' => '161,162,163','relation_filter' => '',],
714 | ['model_id' => 12,'model_field_id' => 221,'relation_model_id' => 1,'relation_field_id' => 1,'relation_show_field_id' => '3,4','relation_filter' => '',],
715 | ['model_id' => 12,'model_field_id' => 222,'relation_model_id' => 3,'relation_field_id' => 40,'relation_show_field_id' => '41,42','relation_filter' => '',],
716 | ['model_id' => 12,'model_field_id' => 223,'relation_model_id' => 3,'relation_field_id' => 40,'relation_show_field_id' => '41,42','relation_filter' => '',],
717 | ['model_id' => 12,'model_field_id' => 224,'relation_model_id' => 2,'relation_field_id' => 20,'relation_show_field_id' => '21','relation_filter' => '',],
718 | ];
719 | $this->table('model_relation')->insert($data)->save();
720 |
721 | //model_action 模型动作表
722 | $data = [
723 | ['id' => 1,'label' => '模型管理列表','api_path' => '/vuecmf/model_config','model_id' => 1,'action_type' => 'list','status' => 10,],
724 | ['id' => 2,'label' => '保存模型','api_path' => '/vuecmf/model_config/save','model_id' => 1,'action_type' => 'save','status' => 10,],
725 | ['id' => 3,'label' => '删除模型','api_path' => '/vuecmf/model_config/delete','model_id' => 1,'action_type' => 'delete','status' => 10,],
726 | ['id' => 4,'label' => '批量保存模型','api_path' => '/vuecmf/model_config/save_all','model_id' => 1,'action_type' => 'save_all','status' => 10,],
727 | ['id' => 5,'label' => '批量删除模型','api_path' => '/vuecmf/model_config/delete_batch','model_id' => 1,'action_type' => 'delete_batch','status' => 10,],
728 | ['id' => 6,'label' => '模型下拉列表','api_path' => '/vuecmf/model_config/dropdown','model_id' => 1,'action_type' => 'dropdown','status' => 10,],
729 | ['id' => 20,'label' => '模型动作管理列表','api_path' => '/vuecmf/model_action','model_id' => 2,'action_type' => 'list','status' => 10,],
730 | ['id' => 21,'label' => '保存模型动作','api_path' => '/vuecmf/model_action/save','model_id' => 2,'action_type' => 'save','status' => 10,],
731 | ['id' => 22,'label' => '删除模型动作','api_path' => '/vuecmf/model_action/delete','model_id' => 2,'action_type' => 'delete','status' => 10,],
732 | ['id' => 23,'label' => '动作下拉列表','api_path' => '/vuecmf/model_action/dropdown','model_id' => 2,'action_type' => 'dropdown','status' => 10,],
733 | ['id' => 24,'label' => '批量保存模型动作','api_path' => '/vuecmf/model_action/save_all','model_id' => 2,'action_type' => 'save_all','status' => 10,],
734 | ['id' => 25,'label' => '批量删除模型动作','api_path' => '/vuecmf/model_action/delete_batch','model_id' => 2,'action_type' => 'delete_batch','status' => 10,],
735 | ['id' => 40,'label' => '模型字段管理列表','api_path' => '/vuecmf/model_field','model_id' => 3,'action_type' => 'list','status' => 10,],
736 | ['id' => 41,'label' => '保存模型字段','api_path' => '/vuecmf/model_field/save','model_id' => 3,'action_type' => 'save','status' => 10,],
737 | ['id' => 42,'label' => '删除模型字段','api_path' => '/vuecmf/model_field/delete','model_id' => 3,'action_type' => 'delete','status' => 10,],
738 | ['id' => 43,'label' => '字段下拉列表','api_path' => '/vuecmf/model_field/dropdown','model_id' => 3,'action_type' => 'dropdown','status' => 10,],
739 | ['id' => 44,'label' => '批量保存模型字段','api_path' => '/vuecmf/model_field/save_all','model_id' => 3,'action_type' => 'save_all','status' => 10,],
740 | ['id' => 45,'label' => '批量删除模型字段','api_path' => '/vuecmf/model_field/delete_batch','model_id' => 3,'action_type' => 'delete_batch','status' => 10,],
741 | ['id' => 60,'label' => '字段选项管理列表','api_path' => '/vuecmf/field_option','model_id' => 4,'action_type' => 'list','status' => 10,],
742 | ['id' => 61,'label' => '保存字段选项','api_path' => '/vuecmf/field_option/save','model_id' => 4,'action_type' => 'save','status' => 10,],
743 | ['id' => 62,'label' => '删除字段选项','api_path' => '/vuecmf/field_option/delete','model_id' => 4,'action_type' => 'delete','status' => 10,],
744 | ['id' => 63,'label' => '批量保存字段选项','api_path' => '/vuecmf/field_option/save_all','model_id' => 4,'action_type' => 'save_all','status' => 10,],
745 | ['id' => 64,'label' => '批量删除字段选项','api_path' => '/vuecmf/field_option/delete_batch','model_id' => 4,'action_type' => 'delete_batch','status' => 10,],
746 | ['id' => 65,'label' => '字段选项下拉列表','api_path' => '/vuecmf/field_option/dropdown','model_id' => 4,'action_type' => 'dropdown','status' => 10,],
747 | ['id' => 80,'label' => '模型索引管理列表','api_path' => '/vuecmf/model_index','model_id' => 5,'action_type' => 'list','status' => 10,],
748 | ['id' => 81,'label' => '保存模型索引','api_path' => '/vuecmf/model_index/save','model_id' => 5,'action_type' => 'save','status' => 10,],
749 | ['id' => 82,'label' => '删除模型索引','api_path' => '/vuecmf/model_index/delete','model_id' => 5,'action_type' => 'delete','status' => 10,],
750 | ['id' => 83,'label' => '批量保存模型索引','api_path' => '/vuecmf/model_index/save_all','model_id' => 5,'action_type' => 'save_all','status' => 10,],
751 | ['id' => 84,'label' => '批量删除模型索引','api_path' => '/vuecmf/model_index/delete_batch','model_id' => 5,'action_type' => 'delete_batch','status' => 10,],
752 | ['id' => 100,'label' => '模型关联管理列表','api_path' => '/vuecmf/model_relation','model_id' => 6,'action_type' => 'list','status' => 10,],
753 | ['id' => 101,'label' => '保存模型关联','api_path' => '/vuecmf/model_relation/save','model_id' => 6,'action_type' => 'save','status' => 10,],
754 | ['id' => 102,'label' => '删除模型关联','api_path' => '/vuecmf/model_relation/delete','model_id' => 6,'action_type' => 'delete','status' => 10,],
755 | ['id' => 103,'label' => '批量保存模型关联','api_path' => '/vuecmf/model_relation/save_all','model_id' => 6,'action_type' => 'save_all','status' => 10,],
756 | ['id' => 104,'label' => '批量删除模型关联','api_path' => '/vuecmf/model_relation/delete_batch','model_id' => 6,'action_type' => 'delete_batch','status' => 10,],
757 | ['id' => 120,'label' => '菜单管理列表','api_path' => '/vuecmf/menu','model_id' => 7,'action_type' => 'list','status' => 10,],
758 | ['id' => 121,'label' => '保存菜单','api_path' => '/vuecmf/menu/save','model_id' => 7,'action_type' => 'save','status' => 10,],
759 | ['id' => 122,'label' => '删除菜单','api_path' => '/vuecmf/menu/delete','model_id' => 7,'action_type' => 'delete','status' => 10,],
760 | ['id' => 123,'label' => '导航菜单','api_path' => '/vuecmf/menu/nav','model_id' => 7,'action_type' => 'nav','status' => 10,],
761 | ['id' => 124,'label' => '批量保存菜单','api_path' => '/vuecmf/menu/save_all','model_id' => 7,'action_type' => 'save_all','status' => 10,],
762 | ['id' => 125,'label' => '批量删除菜单','api_path' => '/vuecmf/menu/delete_batch','model_id' => 7,'action_type' => 'delete_batch','status' => 10,],
763 | ['id' => 140,'label' => '管理员列表','api_path' => '/vuecmf/admin','model_id' => 8,'action_type' => 'list','status' => 10,],
764 | ['id' => 141,'label' => '保存管理员','api_path' => '/vuecmf/admin/save','model_id' => 8,'action_type' => 'save','status' => 10,],
765 | ['id' => 142,'label' => '删除管理员','api_path' => '/vuecmf/admin/delete','model_id' => 8,'action_type' => 'delete','status' => 10,],
766 | ['id' => 143,'label' => '管理员详情','api_path' => '/vuecmf/admin/detail','model_id' => 8,'action_type' => 'detail','status' => 10,],
767 | ['id' => 144,'label' => '获取动作列表','api_path' => '/vuecmf/model_action/get_action_list','model_id' => 8,'action_type' => 'action_list','status' => 10,],
768 | ['id' => 145,'label' => '分配角色','api_path' => '/vuecmf/admin/add_role','model_id' => 8,'action_type' => 'assign_role','status' => 10,],
769 | ['id' => 146,'label' => '登录后台','api_path' => '/vuecmf/admin/login','model_id' => 8,'action_type' => 'login','status' => 10,],
770 | ['id' => 147,'label' => '退出系统','api_path' => '/vuecmf/admin/logout','model_id' => 8,'action_type' => 'logout','status' => 10,],
771 | ['id' => 148,'label' => '批量保存管理员','api_path' => '/vuecmf/admin/save_all','model_id' => 8,'action_type' => 'save_all','status' => 10,],
772 | ['id' => 149,'label' => '批量删除管理员','api_path' => '/vuecmf/admin/delete_batch','model_id' => 8,'action_type' => 'delete_batch','status' => 10,],
773 | ['id' => 150,'label' => '获取所有角色','api_path' => '/vuecmf/admin/get_all_roles','model_id' => 8,'action_type' => 'get_all_roles','status' => 10,],
774 | ['id' => 151,'label' => '获取用户的角色','api_path' => '/vuecmf/admin/get_roles','model_id' => 8,'action_type' => 'get_roles','status' => 10,],
775 | ['id' => 152,'label' => '设置用户权限','api_path' => '/vuecmf/admin/set_user_permission','model_id' => 8,'action_type' => 'set_user_permission','status' => 10,],
776 | ['id' => 153,'label' => '获取用户权限','api_path' => '/vuecmf/admin/get_user_permission','model_id' => 8,'action_type' => 'get_user_permission','status' => 10,],
777 | ['id' => 180,'label' => '模型表单管理列表','api_path' => '/vuecmf/model_form','model_id' => 9,'action_type' => 'list','status' => 10,],
778 | ['id' => 181,'label' => '保存模型表单','api_path' => '/vuecmf/model_form/save','model_id' => 9,'action_type' => 'save','status' => 10,],
779 | ['id' => 182,'label' => '删除模型表单','api_path' => '/vuecmf/model_form/delete','model_id' => 9,'action_type' => 'delete','status' => 10,],
780 | ['id' => 183,'label' => '表单下拉列表','api_path' => '/vuecmf/model_form/dropdown','model_id' => 9,'action_type' => 'dropdown','status' => 10,],
781 | ['id' => 184,'label' => '批量保存模型表单','api_path' => '/vuecmf/model_form/save_all','model_id' => 9,'action_type' => 'save_all','status' => 10,],
782 | ['id' => 185,'label' => '批量删除模型表单','api_path' => '/vuecmf/model_form/delete_batch','model_id' => 9,'action_type' => 'delete_batch','status' => 10,],
783 | ['id' => 200,'label' => '模型表单验证管理列表','api_path' => '/vuecmf/model_form_rules','model_id' => 10,'action_type' => 'list','status' => 10,],
784 | ['id' => 201,'label' => '保存模型表单验证','api_path' => '/vuecmf/model_form_rules/save','model_id' => 10,'action_type' => 'save','status' => 10,],
785 | ['id' => 202,'label' => '删除模型表单验证','api_path' => '/vuecmf/model_form_rules/delete','model_id' => 10,'action_type' => 'delete','status' => 10,],
786 | ['id' => 203,'label' => '批量保存模型表单验证','api_path' => '/vuecmf/model_form_rules/save_all','model_id' => 10,'action_type' => 'save_all','status' => 10,],
787 | ['id' => 204,'label' => '批量删除模型表单验证','api_path' => '/vuecmf/model_form_rules/delete_batch','model_id' => 10,'action_type' => 'delete_batch','status' => 10,],
788 | ['id' => 220,'label' => '角色管理列表','api_path' => '/vuecmf/roles','model_id' => 11,'action_type' => 'list','status' => 10,],
789 | ['id' => 221,'label' => '保存角色','api_path' => '/vuecmf/roles/save','model_id' => 11,'action_type' => 'save','status' => 10,],
790 | ['id' => 222,'label' => '删除角色','api_path' => '/vuecmf/roles/delete','model_id' => 11,'action_type' => 'delete','status' => 10,],
791 | ['id' => 223,'label' => '批量保存角色','api_path' => '/vuecmf/roles/save_all','model_id' => 11,'action_type' => 'save_all','status' => 10,],
792 | ['id' => 224,'label' => '获取动作列表','api_path' => '/vuecmf/model_action/get_action_list','model_id' => 11,'action_type' => 'action_list','status' => 10,],
793 | ['id' => 225,'label' => '批量删除角色','api_path' => '/vuecmf/roles/delete_batch','model_id' => 11,'action_type' => 'delete_batch','status' => 10,],
794 | ['id' => 226,'label' => '批量分配用户','api_path' => '/vuecmf/roles/add_users','model_id' => 11,'action_type' => 'assign_users','status' => 10,],
795 | ['id' => 227,'label' => '批量删除用户','api_path' => '/vuecmf/roles/del_users','model_id' => 11,'action_type' => 'del_users','status' => 10,],
796 | ['id' => 228,'label' => '设置角色权限','api_path' => '/vuecmf/roles/add_permission','model_id' => 11,'action_type' => 'add_permission','status' => 10,],
797 | ['id' => 229,'label' => '删除角色权限','api_path' => '/vuecmf/roles/del_permission','model_id' => 11,'action_type' => 'del_permission','status' => 10,],
798 | ['id' => 230,'label' => '获取角色下所有用户','api_path' => '/vuecmf/roles/get_users','model_id' => 11,'action_type' => 'get_users','status' => 10,],
799 | ['id' => 231,'label' => '获取角色下所有权限','api_path' => '/vuecmf/roles/get_permission','model_id' => 11,'action_type' => 'get_permission','status' => 10,],
800 | ['id' => 232,'label' => '获取所有用户','api_path' => '/vuecmf/roles/get_all_users','model_id' => 11,'action_type' => 'get_all_users','status' => 10,],
801 | ['id' => 260,'label' => '模型联动设置列表','api_path' => '/vuecmf/model_form_linkage','model_id' => 12,'action_type' => 'list','status' => 10,],
802 | ['id' => 261,'label' => '保存模型联动设置','api_path' => '/vuecmf/model_form_linkage/save','model_id' => 12,'action_type' => 'save','status' => 10,],
803 | ['id' => 262,'label' => '删除模型联动设置','api_path' => '/vuecmf/model_form_linkage/delete','model_id' => 12,'action_type' => 'delete','status' => 10,],
804 | ['id' => 263,'label' => '批量保存模型联动设置','api_path' => '/vuecmf/model_form_linkage/save_all','model_id' => 12,'action_type' => 'save_all','status' => 10,],
805 | ['id' => 264,'label' => '批量删除模型联动设置','api_path' => '/vuecmf/model_form_linkage/delete_batch','model_id' => 12,'action_type' => 'delete_batch','status' => 10,],
806 | ['id' => 280,'label' => '文件上传','api_path' => '/vuecmf/upload','model_id' => 13,'action_type' => 'upload','status' => 10,],
807 | ['id' => 300,'label' => '应用管理列表','api_path' => '/vuecmf/app_config','model_id' => 14,'action_type' => 'list','status' => 10,],
808 | ['id' => 301,'label' => '保存应用','api_path' => '/vuecmf/app_config/save','model_id' => 14,'action_type' => 'save','status' => 10,],
809 | ['id' => 302,'label' => '删除应用','api_path' => '/vuecmf/app_config/delete','model_id' => 14,'action_type' => 'delete','status' => 10,],
810 | ['id' => 303,'label' => '应用下拉列表','api_path' => '/vuecmf/app_config/dropdown','model_id' => 14,'action_type' => 'dropdown','status' => 10,],
811 | ['id' => 304,'label' => '批量保存应用','api_path' => '/vuecmf/app_config/save_all','model_id' => 14,'action_type' => 'save_all','status' => 10,],
812 | ['id' => 305,'label' => '批量删除应用','api_path' => '/vuecmf/app_config/delete_batch','model_id' => 14,'action_type' => 'delete_batch','status' => 10,],
813 | ];
814 | $this->table('model_action')->insert($data)->save();
815 |
816 | //model_form 模型表单表
817 | $data = [
818 | ['id' => 1,'model_id' => 1,'model_field_id' => 2,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 1,'status' => 10,],
819 | ['id' => 2,'model_id' => 1,'model_field_id' => 3,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 2,'status' => 10,],
820 | ['id' => 3,'model_id' => 1,'model_field_id' => 4,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 3,'status' => 10,],
821 | ['id' => 4,'model_id' => 1,'model_field_id' => 5,'type' => 'select','default_value' => 'template/content/List','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 4,'status' => 10,],
822 | ['id' => 5,'model_id' => 1,'model_field_id' => 6,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 5,'status' => 10,],
823 | ['id' => 6,'model_id' => 1,'model_field_id' => 7,'type' => 'select_mul','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 6,'status' => 10,],
824 | ['id' => 7,'model_id' => 1,'model_field_id' => 9,'type' => 'radio','default_value' => '20','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 7,'status' => 10,],
825 | ['id' => 8,'model_id' => 1,'model_field_id' => 10,'type' => 'textarea','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 8,'status' => 10,],
826 | ['id' => 9,'model_id' => 1,'model_field_id' => 11,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 9,'status' => 10,],
827 | ['id' => 20,'model_id' => 2,'model_field_id' => 23,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 20,'status' => 10,],
828 | ['id' => 21,'model_id' => 2,'model_field_id' => 21,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 21,'status' => 10,],
829 | ['id' => 22,'model_id' => 2,'model_field_id' => 22,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 22,'status' => 10,],
830 | ['id' => 23,'model_id' => 2,'model_field_id' => 24,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 23,'status' => 10,],
831 | ['id' => 24,'model_id' => 2,'model_field_id' => 25,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 24,'status' => 10,],
832 | ['id' => 40,'model_id' => 3,'model_field_id' => 41,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 40,'status' => 10,],
833 | ['id' => 41,'model_id' => 3,'model_field_id' => 42,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 41,'status' => 10,],
834 | ['id' => 42,'model_id' => 3,'model_field_id' => 43,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 42,'status' => 10,],
835 | ['id' => 43,'model_id' => 3,'model_field_id' => 44,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 43,'status' => 10,],
836 | ['id' => 44,'model_id' => 3,'model_field_id' => 45,'type' => 'input_number','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 44,'status' => 10,],
837 | ['id' => 45,'model_id' => 3,'model_field_id' => 46,'type' => 'input_number','default_value' => '0','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 45,'status' => 10,],
838 | ['id' => 46,'model_id' => 3,'model_field_id' => 47,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 46,'status' => 10,],
839 | ['id' => 47,'model_id' => 3,'model_field_id' => 49,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 47,'status' => 10,],
840 | ['id' => 48,'model_id' => 3,'model_field_id' => 48,'type' => 'textarea','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 48,'status' => 10,],
841 | ['id' => 49,'model_id' => 3,'model_field_id' => 50,'type' => 'radio','default_value' => '20','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 49,'status' => 10,],
842 | ['id' => 50,'model_id' => 3,'model_field_id' => 51,'type' => 'radio','default_value' => '20','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 50,'status' => 10,],
843 | ['id' => 51,'model_id' => 3,'model_field_id' => 52,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 51,'status' => 10,],
844 | ['id' => 52,'model_id' => 3,'model_field_id' => 53,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 52,'status' => 10,],
845 | ['id' => 53,'model_id' => 3,'model_field_id' => 54,'type' => 'radio','default_value' => '20','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 53,'status' => 10,],
846 | ['id' => 54,'model_id' => 3,'model_field_id' => 55,'type' => 'input_number','default_value' => '150','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 54,'status' => 10,],
847 | ['id' => 55,'model_id' => 3,'model_field_id' => 56,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 55,'status' => 10,],
848 | ['id' => 56,'model_id' => 3,'model_field_id' => 57,'type' => 'input_number','default_value' => '0','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 56,'status' => 10,],
849 | ['id' => 57,'model_id' => 3,'model_field_id' => 58,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 57,'status' => 10,],
850 | ['id' => 80,'model_id' => 4,'model_field_id' => 62,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 80,'status' => 10,],
851 | ['id' => 81,'model_id' => 4,'model_field_id' => 63,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 81,'status' => 10,],
852 | ['id' => 82,'model_id' => 4,'model_field_id' => 64,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 82,'status' => 10,],
853 | ['id' => 83,'model_id' => 4,'model_field_id' => 65,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 83,'status' => 10,],
854 | ['id' => 84,'model_id' => 4,'model_field_id' => 66,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 84,'status' => 10,],
855 | ['id' => 100,'model_id' => 5,'model_field_id' => 81,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 100,'status' => 10,],
856 | ['id' => 101,'model_id' => 5,'model_field_id' => 82,'type' => 'select_mul','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 101,'status' => 10,],
857 | ['id' => 102,'model_id' => 5,'model_field_id' => 83,'type' => 'select','default_value' => 'NORMAL','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 102,'status' => 10,],
858 | ['id' => 103,'model_id' => 5,'model_field_id' => 84,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 103,'status' => 10,],
859 | ['id' => 120,'model_id' => 6,'model_field_id' => 101,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 120,'status' => 10,],
860 | ['id' => 121,'model_id' => 6,'model_field_id' => 102,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 121,'status' => 10,],
861 | ['id' => 122,'model_id' => 6,'model_field_id' => 103,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 122,'status' => 10,],
862 | ['id' => 123,'model_id' => 6,'model_field_id' => 104,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 123,'status' => 10,],
863 | ['id' => 124,'model_id' => 6,'model_field_id' => 105,'type' => 'select_mul','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 124,'status' => 10,],
864 | ['id' => 125,'model_id' => 6,'model_field_id' => 106,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 125,'status' => 10,],
865 | ['id' => 126,'model_id' => 6,'model_field_id' => 107,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 126,'status' => 10,],
866 | ['id' => 140,'model_id' => 7,'model_field_id' => 121,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 140,'status' => 10,],
867 | ['id' => 141,'model_id' => 7,'model_field_id' => 122,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 141,'status' => 10,],
868 | ['id' => 142,'model_id' => 7,'model_field_id' => 123,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 142,'status' => 10,],
869 | ['id' => 143,'model_id' => 7,'model_field_id' => 124,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 143,'status' => 10,],
870 | ['id' => 144,'model_id' => 7,'model_field_id' => 127,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 144,'status' => 10,],
871 | ['id' => 145,'model_id' => 7,'model_field_id' => 129,'type' => 'input_number','default_value' => '0','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 145,'status' => 10,],
872 | ['id' => 146,'model_id' => 7,'model_field_id' => 130,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 146,'status' => 10,],
873 | ['id' => 160,'model_id' => 8,'model_field_id' => 141,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '用户名长度为4到32个字符','is_edit'=> 20,'sort_num' => 160,'status' => 10,],
874 | ['id' => 161,'model_id' => 8,'model_field_id' => 142,'type' => 'password','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 161,'status' => 10,],
875 | ['id' => 162,'model_id' => 8,'model_field_id' => 143,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 162,'status' => 10,],
876 | ['id' => 163,'model_id' => 8,'model_field_id' => 144,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 163,'status' => 10,],
877 | ['id' => 164,'model_id' => 8,'model_field_id' => 145,'type' => 'radio','default_value' => '20','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 164,'status' => 10,],
878 | ['id' => 180,'model_id' => 9,'model_field_id' => 161,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 180,'status' => 10,],
879 | ['id' => 181,'model_id' => 9,'model_field_id' => 162,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 181,'status' => 10,],
880 | ['id' => 182,'model_id' => 9,'model_field_id' => 163,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 182,'status' => 10,],
881 | ['id' => 183,'model_id' => 9,'model_field_id' => 164,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 183,'status' => 10,],
882 | ['id' => 184,'model_id' => 9,'model_field_id' => 165,'type' => 'radio','default_value' => '20','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 184,'status' => 10,],
883 | ['id' => 185,'model_id' => 9,'model_field_id' => 166,'type' => 'input_number','default_value' => '0','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 185,'status' => 10,],
884 | ['id' => 186,'model_id' => 9,'model_field_id' => 167,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 186,'status' => 10,],
885 | ['id' => 200,'model_id' => 10,'model_field_id' => 181,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 200,'status' => 10,],
886 | ['id' => 201,'model_id' => 10,'model_field_id' => 182,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 201,'status' => 10,],
887 | ['id' => 202,'model_id' => 10,'model_field_id' => 183,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 202,'status' => 10,],
888 | ['id' => 203,'model_id' => 10,'model_field_id' => 184,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 203,'status' => 10,],
889 | ['id' => 204,'model_id' => 10,'model_field_id' => 185,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 204,'status' => 10,],
890 | ['id' => 205,'model_id' => 10,'model_field_id' => 186,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 205,'status' => 10,],
891 | ['id' => 220,'model_id' => 11,'model_field_id' => 201,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 220,'status' => 10,],
892 | ['id' => 221,'model_id' => 11,'model_field_id' => 203,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 221,'status' => 10,],
893 | ['id' => 222,'model_id' => 11,'model_field_id' => 205,'type' => 'textarea','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 222,'status' => 10,],
894 | ['id' => 223,'model_id' => 11,'model_field_id' => 206,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 223,'status' => 10,],
895 | ['id' => 240,'model_id' => 12,'model_field_id' => 221,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 240,'status' => 10,],
896 | ['id' => 241,'model_id' => 12,'model_field_id' => 222,'type' => 'select','default_value' => '','is_disabled' => 10,'sort_num' => 241,'status' => 10,],
897 | ['id' => 242,'model_id' => 12,'model_field_id' => 223,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 242,'status' => 10,],
898 | ['id' => 243,'model_id' => 12,'model_field_id' => 224,'type' => 'select','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 243,'status' => 10,],
899 | ['id' => 244,'model_id' => 12,'model_field_id' => 225,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 244,'status' => 10,],
900 | ['id' => 260,'model_id' => 14,'model_field_id' => 241,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 260,'status' => 10,],
901 | ['id' => 261,'model_id' => 14,'model_field_id' => 242,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 261,'status' => 10,],
902 | ['id' => 262,'model_id' => 14,'model_field_id' => 243,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 262,'status' => 10,],
903 | ['id' => 263,'model_id' => 14,'model_field_id' => 244,'type' => 'textarea','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 263,'status' => 10,],
904 | ['id' => 264,'model_id' => 14,'model_field_id' => 245,'type' => 'radio','default_value' => '20','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 264,'status' => 10,],
905 | ['id' => 265,'model_id' => 3,'model_field_id' => 247,'type' => 'radio','default_value' => '20','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 55,'status' => 10,],
906 | ['id' => 273,'model_id' => 9,'model_field_id' => 261,'type' => 'text','default_value' => '','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 185,'status' => 10,],
907 | ['id' => 274,'model_id' => 9,'model_field_id' => 262,'type' => 'radio','default_value' => '10','is_disabled' => 20,'placeholder' => '','is_edit'=> 10,'sort_num' => 186,'status' => 10,],
908 | ];
909 | $this->table('model_form')->insert($data)->save();
910 |
911 | //model_form_rules 表单验证规则表
912 | $data = [
913 | ['model_id' => 1,'model_form_id' => 1,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
914 | ['model_id' => 1,'model_form_id' => 2,'rule_type' => 'require','rule_value' => '','error_tips' => '表名必填',],
915 | ['model_id' => 1,'model_form_id' => 3,'rule_type' => 'require','rule_value' => '','error_tips' => '模型标签必填',],
916 | ['model_id' => 1,'model_form_id' => 4,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
917 | ['model_id' => 2,'model_form_id' => 20,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
918 | ['model_id' => 2,'model_form_id' => 21,'rule_type' => 'require','rule_value' => '','error_tips' => '动作标签必填',],
919 | ['model_id' => 2,'model_form_id' => 22,'rule_type' => 'require','rule_value' => '','error_tips' => '后端请求地址必填',],
920 | ['model_id' => 2,'model_form_id' => 23,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
921 | ['model_id' => 2,'model_form_id' => 24,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
922 | ['model_id' => 3,'model_form_id' => 40,'rule_type' => 'require','rule_value' => '','error_tips' => '字段名称必填',],
923 | ['model_id' => 3,'model_form_id' => 41,'rule_type' => 'require','rule_value' => '','error_tips' => '字段中文名必填',],
924 | ['model_id' => 3,'model_form_id' => 42,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
925 | ['model_id' => 3,'model_form_id' => 43,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
926 | ['model_id' => 3,'model_form_id' => 44,'rule_type' => 'number','rule_value' => '','error_tips' => '请输入数字',],
927 | ['model_id' => 4,'model_form_id' => 80,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
928 | ['model_id' => 4,'model_form_id' => 81,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
929 | ['model_id' => 4,'model_form_id' => 82,'rule_type' => 'require','rule_value' => '','error_tips' => '选项值必填',],
930 | ['model_id' => 4,'model_form_id' => 83,'rule_type' => 'require','rule_value' => '','error_tips' => '选项标签必填',],
931 | ['model_id' => 5,'model_form_id' => 100,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
932 | ['model_id' => 5,'model_form_id' => 101,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
933 | ['model_id' => 5,'model_form_id' => 102,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
934 | ['model_id' => 6,'model_form_id' => 120,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
935 | ['model_id' => 6,'model_form_id' => 121,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
936 | ['model_id' => 6,'model_form_id' => 122,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
937 | ['model_id' => 6,'model_form_id' => 123,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
938 | ['model_id' => 6,'model_form_id' => 124,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
939 | ['model_id' => 7,'model_form_id' => 140,'rule_type' => 'require','rule_value' => '','error_tips' => '菜单标题必填',],
940 | ['model_id' => 8,'model_form_id' => 160,'rule_type' => 'require','rule_value' => '','error_tips' => '用户名必填',],
941 | ['model_id' => 8,'model_form_id' => 160,'rule_type' => 'length','rule_value' => '4,32','error_tips' => '用户名长度为4到32个字符',],
942 | ['model_id' => 8,'model_form_id' => 162,'rule_type' => 'require','rule_value' => '','error_tips' => '邮箱必填',],
943 | ['model_id' => 8,'model_form_id' => 162,'rule_type' => 'email','rule_value' => '','error_tips' => '邮箱输入有误',],
944 | ['model_id' => 8,'model_form_id' => 163,'rule_type' => 'require','rule_value' => '','error_tips' => '手机必填',],
945 | ['model_id' => 8,'model_form_id' => 163,'rule_type' => 'mobile','rule_value' => '','error_tips' => '手机输入有误',],
946 | ['model_id' => 9,'model_form_id' => 180,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
947 | ['model_id' => 9,'model_form_id' => 181,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
948 | ['model_id' => 9,'model_form_id' => 182,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
949 | ['model_id' => 10,'model_form_id' => 200,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
950 | ['model_id' => 10,'model_form_id' => 201,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
951 | ['model_id' => 10,'model_form_id' => 202,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
952 | ['model_id' => 11,'model_form_id' => 220,'rule_type' => 'require','rule_value' => '','error_tips' => '角色名称必填',],
953 | ['model_id' => 12,'model_form_id' => 240,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
954 | ['model_id' => 12,'model_form_id' => 241,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
955 | ['model_id' => 12,'model_form_id' => 242,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
956 | ['model_id' => 12,'model_form_id' => 243,'rule_type' => 'require','rule_value' => '','error_tips' => '请选择',],
957 | ['model_id' => 14,'model_form_id' => 260,'rule_type' => 'require','rule_value' => '','error_tips' => '应用名称必填',],
958 | ];
959 | $this->table('model_form_rules')->insert($data)->save();
960 |
961 | //admin 管理员表: password = 123456
962 | $data = [
963 | ['username' => 'vuecmf','password' => '$2a$10$/OGrqqU4vJomU475crwBM.wi3380HsDY3RWnq1OyZaM7RRQvzZMeG','email' => '2278667823@qq.com','mobile' => '18988888888','is_super' => 10,],
964 | ];
965 | $this->table('admin')->insert($data)->save();
966 |
967 | //menu 菜单管理表
968 | $data = [
969 | ['id' => 1,'title' => '系统管理','icon' => 'setting','pid' => 0,'id_path' => '','path_name' => '','model_id' => 0,'app_id' => 1,'type' => 10,'sort_num' => 999999,'status' => 10,],
970 | ['id' => 2,'title' => '系统授权','icon' => 'lock','pid' => 1,'id_path' => 'm1','path_name' => '系统管理,系统授权','model_id' => 0,'app_id' => 1,'type' => 10,'sort_num' => 2,'status' => 10,],
971 | ['id' => 3,'title' => '管理员','icon' => 'user','pid' => 2,'id_path' => 'm1,m2','path_name' => '系统管理,系统授权,管理员','model_id' => 8,'app_id' => 1,'type' => 10,'sort_num' => 3,'status' => 10,],
972 | ['id' => 4,'title' => '角色','icon' => 'document','pid' => 2,'id_path' => 'm1,m2','path_name' => '系统管理,系统授权,角色','model_id' => 11,'app_id' => 1,'type' => 10,'sort_num' => 4,'status' => 10,],
973 | ['id' => 5,'title' => '应用管理','icon' => 'folder','pid' => 1,'id_path' => 'm1','path_name' => '系统管理,应用管理','model_id' => 14,'app_id' => 1,'type' => 10,'sort_num' => 5,'status' => 10,],
974 | ['id' => 6,'title' => '模型配置','icon' => 'document-copy','pid' => 1,'id_path' => 'm1','path_name' => '系统管理,模型配置','model_id' => 1,'app_id' => 1,'type' => 10,'sort_num' => 6,'status' => 10,],
975 | ['id' => 7,'title' => '菜单配置','icon' => 'notebook','pid' => 1,'id_path' => 'm1','path_name' => '系统管理,菜单配置','model_id' => 7,'app_id' => 1,'type' => 10,'sort_num' => 7,'status' => 10,],
976 | ];
977 | $this->table('menu')->insert($data)->save();
978 |
979 | //model_form_linkage 表单联动表
980 | $data = [
981 | ['model_id' => 1,'model_field_id' => 3,'linkage_field_id' => 6,'linkage_action_id' => 23,],
982 | ['model_id' => 1,'model_field_id' => 3,'linkage_field_id' => 7,'linkage_action_id' => 43,],
983 | ['model_id' => 5,'model_field_id' => 81,'linkage_field_id' => 82,'linkage_action_id' => 43,],
984 | ['model_id' => 6,'model_field_id' => 103,'linkage_field_id' => 104,'linkage_action_id' => 43,],
985 | ['model_id' => 6,'model_field_id' => 103,'linkage_field_id' => 105,'linkage_action_id' => 43,],
986 | ['model_id' => 7,'model_field_id' => 124,'linkage_field_id' => 127,'linkage_action_id' => 6,],
987 | ['model_id' => 9,'model_field_id' => 161,'linkage_field_id' => 162,'linkage_action_id' => 43,],
988 | ['model_id' => 9,'model_field_id' => 163,'linkage_field_id' => 164,'linkage_action_id' => 65,],
989 | ['model_id' => 12,'model_field_id' => 223,'linkage_field_id' => 224,'linkage_action_id' => 23,],
990 | ];
991 | $this->table('model_form_linkage')->insert($data)->save();
992 |
993 | //设置起始值
994 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'app_config AUTO_INCREMENT=1000;');
995 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'model_config AUTO_INCREMENT=1000;');
996 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'model_field AUTO_INCREMENT=1000;');
997 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'field_option AUTO_INCREMENT=1000;');
998 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'model_action AUTO_INCREMENT=1000;');
999 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'model_relation AUTO_INCREMENT=1000;');
1000 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'model_index AUTO_INCREMENT=1000;');
1001 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'menu AUTO_INCREMENT=1000;');
1002 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'admin AUTO_INCREMENT=1000;');
1003 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'model_form AUTO_INCREMENT=1000;');
1004 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'model_form_rules AUTO_INCREMENT=1000;');
1005 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'roles AUTO_INCREMENT=1000;');
1006 | $this->execute('ALTER TABLE '.config('database.connections.mysql.prefix').'model_form_linkage AUTO_INCREMENT=1000;');
1007 | }
1008 |
1009 | public function down()
1010 | {
1011 | $this->table('app_config')->drop();
1012 | $this->table('model_config')->drop();
1013 | $this->table('model_field')->drop();
1014 | $this->table('field_option')->drop();
1015 | $this->table('model_action')->drop();
1016 | $this->table('model_relation')->drop();
1017 | $this->table('model_index')->drop();
1018 | $this->table('menu')->drop();
1019 | $this->table('admin')->drop();
1020 | $this->table('model_form')->drop();
1021 | $this->table('model_form_rules')->drop();
1022 | $this->table('roles')->drop();
1023 | $this->table('model_form_linkage')->drop();
1024 |
1025 | }
1026 | }
1027 |
--------------------------------------------------------------------------------