This commit is contained in:
parent
91a08e6647
commit
2fc2f7a1fa
821
db/dm8/maku.sql
821
db/dm8/maku.sql
|
|
@ -1,821 +0,0 @@
|
|||
CREATE TABLE sys_user
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
username varchar(50) NOT NULL,
|
||||
password varchar(100),
|
||||
real_name varchar(50),
|
||||
avatar varchar(200),
|
||||
gender int,
|
||||
email varchar(100),
|
||||
mobile varchar(20),
|
||||
org_id bigint,
|
||||
super_admin int,
|
||||
status int,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_user IS '用户管理';
|
||||
COMMENT ON COLUMN sys_user.id IS 'id';
|
||||
COMMENT ON COLUMN sys_user.username IS '用户名';
|
||||
COMMENT ON COLUMN sys_user.password IS '密码';
|
||||
COMMENT ON COLUMN sys_user.real_name IS '姓名';
|
||||
COMMENT ON COLUMN sys_user.avatar IS '头像';
|
||||
COMMENT ON COLUMN sys_user.gender IS '性别 0:男 1:女 2:未知';
|
||||
COMMENT ON COLUMN sys_user.email IS '邮箱';
|
||||
COMMENT ON COLUMN sys_user.mobile IS '手机号';
|
||||
COMMENT ON COLUMN sys_user.org_id IS '机构ID';
|
||||
COMMENT ON COLUMN sys_user.super_admin IS '超级管理员 0:否 1:是';
|
||||
COMMENT ON COLUMN sys_user.status IS '状态 0:停用 1:正常';
|
||||
COMMENT ON COLUMN sys_user.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_user.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_user.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_user.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_user.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_user.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_user.update_time IS '更新时间';
|
||||
|
||||
|
||||
CREATE TABLE sys_user_token
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
user_id bigint,
|
||||
access_token varchar(50) NOT NULL,
|
||||
access_token_expire datetime,
|
||||
refresh_token varchar(50) NOT NULL,
|
||||
refresh_token_expire datetime,
|
||||
tenant_id bigint,
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_user_token IS '用户管理';
|
||||
COMMENT ON COLUMN sys_user_token.id IS 'id';
|
||||
COMMENT ON COLUMN sys_user_token.user_id IS '用户ID';
|
||||
COMMENT ON COLUMN sys_user_token.access_token IS 'accessToken';
|
||||
COMMENT ON COLUMN sys_user_token.access_token_expire IS 'accessToken 过期时';
|
||||
COMMENT ON COLUMN sys_user_token.refresh_token IS 'refreshToken';
|
||||
COMMENT ON COLUMN sys_user_token.refresh_token_expire IS 'refreshToken 过期时间';
|
||||
COMMENT ON COLUMN sys_user_token.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_user_token.create_time IS '创建时间';
|
||||
|
||||
CREATE TABLE sys_third_login
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
open_type varchar(50),
|
||||
open_id varchar(100),
|
||||
username varchar(100),
|
||||
user_id bigint,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_third_login IS '第三方登录';
|
||||
COMMENT ON COLUMN sys_third_login.id IS 'id';
|
||||
COMMENT ON COLUMN sys_third_login.open_type IS '开放平台类型';
|
||||
COMMENT ON COLUMN sys_third_login.open_id IS '开放平台,唯一标识';
|
||||
COMMENT ON COLUMN sys_third_login.username IS '昵称';
|
||||
COMMENT ON COLUMN sys_third_login.username IS '用户ID';
|
||||
COMMENT ON COLUMN sys_third_login.user_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_third_login.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_third_login.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_third_login.create_time IS '创建时间';
|
||||
|
||||
|
||||
CREATE TABLE sys_third_login_config
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
open_type varchar(50),
|
||||
client_id varchar(200),
|
||||
client_secret varchar(200),
|
||||
redirect_uri varchar(200),
|
||||
agent_id varchar(200),
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_third_login_config IS '第三方登录配置';
|
||||
COMMENT ON COLUMN sys_third_login_config.id IS 'id';
|
||||
COMMENT ON COLUMN sys_third_login_config.open_type IS '开放平台类型';
|
||||
COMMENT ON COLUMN sys_third_login_config.client_id IS 'ClientID';
|
||||
COMMENT ON COLUMN sys_third_login_config.client_secret IS 'ClientSecret';
|
||||
COMMENT ON COLUMN sys_third_login_config.redirect_uri IS 'RedirectUri';
|
||||
COMMENT ON COLUMN sys_third_login_config.agent_id IS 'AgentID';
|
||||
COMMENT ON COLUMN sys_third_login_config.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_third_login_config.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_third_login_config.create_time IS '创建时间';
|
||||
|
||||
|
||||
CREATE TABLE sys_org
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
pid bigint,
|
||||
name varchar(50),
|
||||
sort int,
|
||||
leader_id bigint,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_org IS '机构管理';
|
||||
COMMENT ON COLUMN sys_org.id IS 'id';
|
||||
COMMENT ON COLUMN sys_org.pid IS '上级ID';
|
||||
COMMENT ON COLUMN sys_org.name IS '机构名称';
|
||||
COMMENT ON COLUMN sys_org.sort IS '排序';
|
||||
COMMENT ON COLUMN sys_org.leader_id IS '负责人ID';
|
||||
COMMENT ON COLUMN sys_org.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_org.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_org.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_org.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_org.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_org.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_org.update_time IS '更新时间';
|
||||
|
||||
|
||||
create table sys_role
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
name varchar(50),
|
||||
role_code varchar(50),
|
||||
remark varchar(100),
|
||||
data_scope int,
|
||||
org_id bigint,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_role IS '角色管理';
|
||||
COMMENT ON COLUMN sys_role.id IS 'id';
|
||||
COMMENT ON COLUMN sys_role.name IS '角色名称';
|
||||
COMMENT ON COLUMN sys_role.role_code IS '角色编码';
|
||||
COMMENT ON COLUMN sys_role.remark IS '备注';
|
||||
COMMENT ON COLUMN sys_role.data_scope IS '数据范围 0:全部数据 1:本机构及子机构数据 2:本机构数据 3:本人数据 4:自定义数据';
|
||||
COMMENT ON COLUMN sys_role.org_id IS '机构ID';
|
||||
COMMENT ON COLUMN sys_role.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_role.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_role.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_role.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_role.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_role.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_role.update_time IS '更新时间';
|
||||
|
||||
|
||||
create table sys_user_role
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
role_id bigint,
|
||||
user_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_user_role IS '用户角色关系';
|
||||
COMMENT ON COLUMN sys_user_role.id IS 'id';
|
||||
COMMENT ON COLUMN sys_user_role.role_id IS '角色ID';
|
||||
COMMENT ON COLUMN sys_user_role.user_id IS '用户ID';
|
||||
COMMENT ON COLUMN sys_user_role.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_user_role.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_user_role.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_user_role.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_user_role.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_user_role.update_time IS '更新时间';
|
||||
|
||||
CREATE TABLE sys_post
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
post_code varchar(100),
|
||||
post_name varchar(100),
|
||||
sort int,
|
||||
status int,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_post IS '岗位管理';
|
||||
COMMENT ON COLUMN sys_post.id IS 'id';
|
||||
COMMENT ON COLUMN sys_post.post_code IS '岗位编码';
|
||||
COMMENT ON COLUMN sys_post.post_name IS '岗位名称';
|
||||
COMMENT ON COLUMN sys_post.sort IS '排序';
|
||||
COMMENT ON COLUMN sys_post.status IS '状态 0:停用 1:正常';
|
||||
COMMENT ON COLUMN sys_post.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_post.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_post.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_post.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_post.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_post.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_post.update_time IS '更新时间';
|
||||
|
||||
|
||||
CREATE TABLE sys_user_post
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
user_id bigint,
|
||||
post_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_user_post IS '用户岗位关系';
|
||||
COMMENT ON COLUMN sys_user_post.id IS 'id';
|
||||
COMMENT ON COLUMN sys_user_post.user_id IS '用户ID';
|
||||
COMMENT ON COLUMN sys_user_post.post_id IS '岗位ID';
|
||||
COMMENT ON COLUMN sys_user_post.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_user_post.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_user_post.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_user_post.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_user_post.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_user_post.update_time IS '更新时间';
|
||||
|
||||
|
||||
create table sys_menu
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
pid bigint,
|
||||
name varchar(200),
|
||||
url varchar(200),
|
||||
authority varchar(500),
|
||||
type int,
|
||||
open_style int,
|
||||
icon varchar(50),
|
||||
sort int,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_menu IS '菜单管理';
|
||||
COMMENT ON COLUMN sys_menu.id IS 'id';
|
||||
COMMENT ON COLUMN sys_menu.pid IS '上级ID';
|
||||
COMMENT ON COLUMN sys_menu.name IS '菜单名称';
|
||||
COMMENT ON COLUMN sys_menu.url IS '菜单URL';
|
||||
COMMENT ON COLUMN sys_menu.authority IS '授权标识';
|
||||
COMMENT ON COLUMN sys_menu.type IS '类型 0:菜单 1:按钮 2:接口';
|
||||
COMMENT ON COLUMN sys_menu.open_style IS '打开方式 0:内部 1:外部';
|
||||
COMMENT ON COLUMN sys_menu.icon IS '菜单图标';
|
||||
COMMENT ON COLUMN sys_menu.sort IS '排序';
|
||||
COMMENT ON COLUMN sys_menu.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_menu.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_menu.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_menu.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_menu.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_menu.update_time IS '更新时间';
|
||||
|
||||
|
||||
create table sys_role_menu
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
role_id bigint,
|
||||
menu_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_role_menu IS '角色菜单关系';
|
||||
COMMENT ON COLUMN sys_role_menu.id IS 'id';
|
||||
COMMENT ON COLUMN sys_role_menu.role_id IS '角色ID';
|
||||
COMMENT ON COLUMN sys_role_menu.menu_id IS '菜单ID';
|
||||
COMMENT ON COLUMN sys_role_menu.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_role_menu.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_role_menu.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_role_menu.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_role_menu.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_role_menu.update_time IS '更新时间';
|
||||
|
||||
|
||||
create table sys_role_data_scope
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
role_id bigint,
|
||||
org_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_role_id on sys_role_data_scope(role_id);
|
||||
|
||||
COMMENT ON TABLE sys_role_data_scope IS '角色数据权限';
|
||||
COMMENT ON COLUMN sys_role_data_scope.id IS 'id';
|
||||
COMMENT ON COLUMN sys_role_data_scope.role_id IS '角色ID';
|
||||
COMMENT ON COLUMN sys_role_data_scope.org_id IS '机构ID';
|
||||
COMMENT ON COLUMN sys_role_data_scope.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_role_data_scope.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_role_data_scope.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_role_data_scope.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_role_data_scope.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_role_data_scope.update_time IS '更新时间';
|
||||
|
||||
create table sys_dict_type
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
dict_type varchar(100),
|
||||
dict_name varchar(255),
|
||||
dict_source int default 0,
|
||||
dict_sql varchar(500),
|
||||
remark varchar(255),
|
||||
sort int,
|
||||
pid bigint,
|
||||
has_child int default 0,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_dict_type IS '字典类型';
|
||||
COMMENT ON COLUMN sys_dict_type.id IS 'id';
|
||||
COMMENT ON COLUMN sys_dict_type.dict_type IS '字典类型';
|
||||
COMMENT ON COLUMN sys_dict_type.dict_name IS '字典名称';
|
||||
COMMENT ON COLUMN sys_dict_type.dict_source IS '来源 0:字典数据 1:动态SQL';
|
||||
COMMENT ON COLUMN sys_dict_type.dict_sql IS '动态SQL';
|
||||
COMMENT ON COLUMN sys_dict_type.remark IS '备注';
|
||||
COMMENT ON COLUMN sys_dict_type.sort IS '排序';
|
||||
COMMENT ON COLUMN sys_dict_type.pid IS '上级节点';
|
||||
COMMENT ON COLUMN sys_dict_type.has_child IS '是否有子节点';
|
||||
COMMENT ON COLUMN sys_dict_type.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_dict_type.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_dict_type.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_dict_type.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_dict_type.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_dict_type.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_dict_type.update_time IS '更新时间';
|
||||
|
||||
create table sys_dict_data
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
dict_type_id bigint,
|
||||
dict_label varchar(255),
|
||||
dict_value varchar(255),
|
||||
label_class varchar(100),
|
||||
remark varchar(255),
|
||||
sort int,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_dict_data IS '字典数据';
|
||||
COMMENT ON COLUMN sys_dict_data.id IS 'id';
|
||||
COMMENT ON COLUMN sys_dict_data.dict_type_id IS '字典类型ID';
|
||||
COMMENT ON COLUMN sys_dict_data.dict_label IS '字典标签';
|
||||
COMMENT ON COLUMN sys_dict_data.dict_value IS '字典值';
|
||||
COMMENT ON COLUMN sys_dict_data.label_class IS '标签样式';
|
||||
COMMENT ON COLUMN sys_dict_data.remark IS '备注';
|
||||
COMMENT ON COLUMN sys_dict_data.sort IS '排序';
|
||||
COMMENT ON COLUMN sys_dict_data.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_dict_data.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_dict_data.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_dict_data.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_dict_data.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_dict_data.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_dict_data.update_time IS '更新时间';
|
||||
|
||||
create table sys_attachment
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
url varchar(255) NOT NULL,
|
||||
size bigint,
|
||||
platform varchar(50),
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_attachment IS '附件管理';
|
||||
COMMENT ON COLUMN sys_attachment.id IS 'id';
|
||||
COMMENT ON COLUMN sys_attachment.name IS '附件名称';
|
||||
COMMENT ON COLUMN sys_attachment.url IS '附件地址';
|
||||
COMMENT ON COLUMN sys_attachment.size IS '附件大小';
|
||||
COMMENT ON COLUMN sys_attachment.platform IS '存储平台';
|
||||
COMMENT ON COLUMN sys_attachment.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_attachment.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_attachment.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_attachment.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_attachment.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_attachment.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_attachment.update_time IS '更新时间';
|
||||
|
||||
|
||||
create table sys_params
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
param_name varchar(100),
|
||||
param_type int NOT NULL,
|
||||
param_key varchar(100),
|
||||
param_value varchar(2000),
|
||||
remark varchar(200),
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_params IS '参数管理';
|
||||
COMMENT ON COLUMN sys_params.id IS 'id';
|
||||
COMMENT ON COLUMN sys_params.param_name IS '参数名称';
|
||||
COMMENT ON COLUMN sys_params.param_type IS '系统参数 0:否 1:是';
|
||||
COMMENT ON COLUMN sys_params.param_key IS '参数键';
|
||||
COMMENT ON COLUMN sys_params.param_value IS '参数值';
|
||||
COMMENT ON COLUMN sys_params.remark IS '备注';
|
||||
COMMENT ON COLUMN sys_params.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_params.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_params.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_params.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_params.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_params.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_params.update_time IS '更新时间';
|
||||
|
||||
|
||||
create table sys_log_login
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
username varchar(50),
|
||||
ip varchar(32),
|
||||
address varchar(32),
|
||||
user_agent varchar(500),
|
||||
status int,
|
||||
operation int,
|
||||
tenant_id bigint,
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_log_login IS '登录日志';
|
||||
COMMENT ON COLUMN sys_log_login.id IS 'id';
|
||||
COMMENT ON COLUMN sys_log_login.username IS '用户名';
|
||||
COMMENT ON COLUMN sys_log_login.ip IS '登录IP';
|
||||
COMMENT ON COLUMN sys_log_login.address IS '登录地点';
|
||||
COMMENT ON COLUMN sys_log_login.user_agent IS 'User Agent';
|
||||
COMMENT ON COLUMN sys_log_login.status IS '登录状态 0:失败 1:成功';
|
||||
COMMENT ON COLUMN sys_log_login.operation IS '操作信息 0:登录成功 1:退出成功 2:验证码错误 3:账号密码错误';
|
||||
COMMENT ON COLUMN sys_log_login.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_log_login.create_time IS '创建时间';
|
||||
|
||||
|
||||
create table sys_log_operate
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
module varchar(100),
|
||||
name varchar(100),
|
||||
req_uri varchar(200),
|
||||
req_method varchar(20),
|
||||
req_params text,
|
||||
ip varchar(32),
|
||||
address varchar(32),
|
||||
user_agent varchar(500),
|
||||
operate_type int,
|
||||
duration int,
|
||||
status int,
|
||||
user_id int,
|
||||
real_name varchar(50),
|
||||
result_msg varchar(500),
|
||||
tenant_id bigint,
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_log_operate IS '操作日志';
|
||||
COMMENT ON COLUMN sys_log_operate.id IS 'id';
|
||||
COMMENT ON COLUMN sys_log_operate.module IS '模块名';
|
||||
COMMENT ON COLUMN sys_log_operate.name IS '操作名';
|
||||
COMMENT ON COLUMN sys_log_operate.req_uri IS '请求URI';
|
||||
COMMENT ON COLUMN sys_log_operate.req_method IS '请求方法';
|
||||
COMMENT ON COLUMN sys_log_operate.req_params IS '请求参数';
|
||||
COMMENT ON COLUMN sys_log_operate.ip IS '操作IP';
|
||||
COMMENT ON COLUMN sys_log_operate.address IS '登录地点';
|
||||
COMMENT ON COLUMN sys_log_operate.user_agent IS 'User Agent';
|
||||
COMMENT ON COLUMN sys_log_operate.operate_type IS '操作类型';
|
||||
COMMENT ON COLUMN sys_log_operate.status IS '登录状态 0:失败 1:成功';
|
||||
COMMENT ON COLUMN sys_log_operate.user_id IS '用户ID';
|
||||
COMMENT ON COLUMN sys_log_operate.real_name IS '操作人';
|
||||
COMMENT ON COLUMN sys_log_operate.result_msg IS '返回消息';
|
||||
COMMENT ON COLUMN sys_log_operate.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN sys_log_operate.create_time IS '创建时间';
|
||||
|
||||
|
||||
CREATE TABLE sys_sms_config
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
platform int,
|
||||
group_name varchar(100),
|
||||
sign_name varchar(100),
|
||||
template_id varchar(100),
|
||||
app_id varchar(100),
|
||||
sender_id varchar(100),
|
||||
url varchar(200),
|
||||
access_key varchar(100),
|
||||
secret_key varchar(100),
|
||||
status int,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_sms_config IS '短信配置';
|
||||
COMMENT ON COLUMN sys_sms_config.id IS 'id';
|
||||
COMMENT ON COLUMN sys_sms_config.platform IS '平台类型 0:阿里云 1:腾讯云 2:七牛云 3:华为云';
|
||||
COMMENT ON COLUMN sys_sms_config.group_name IS '分组名称,发送短信时,可指定分组';
|
||||
COMMENT ON COLUMN sys_sms_config.sign_name IS '短信签名';
|
||||
COMMENT ON COLUMN sys_sms_config.template_id IS '短信模板';
|
||||
COMMENT ON COLUMN sys_sms_config.app_id IS '短信应用ID,如:腾讯云等';
|
||||
COMMENT ON COLUMN sys_sms_config.sender_id IS '腾讯云国际短信、华为云等需要';
|
||||
COMMENT ON COLUMN sys_sms_config.url IS '接入地址,如:华为云';
|
||||
COMMENT ON COLUMN sys_sms_config.access_key IS 'AccessKey';
|
||||
COMMENT ON COLUMN sys_sms_config.secret_key IS 'SecretKey';
|
||||
COMMENT ON COLUMN sys_sms_config.status IS '状态 0:禁用 1:启用';
|
||||
COMMENT ON COLUMN sys_sms_config.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_sms_config.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_sms_config.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_sms_config.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_sms_config.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_sms_config.update_time IS '更新时间';
|
||||
|
||||
|
||||
CREATE TABLE sys_sms_log
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
platform_id bigint,
|
||||
platform int,
|
||||
mobile varchar(20) NOT NULL,
|
||||
params varchar(200),
|
||||
status int,
|
||||
error varchar(2000),
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_sms_log IS '短信日志';
|
||||
COMMENT ON COLUMN sys_sms_log.id IS 'id';
|
||||
COMMENT ON COLUMN sys_sms_log.platform_id IS '平台ID';
|
||||
COMMENT ON COLUMN sys_sms_log.platform IS '平台类型';
|
||||
COMMENT ON COLUMN sys_sms_log.mobile IS '手机号';
|
||||
COMMENT ON COLUMN sys_sms_log.params IS '参数';
|
||||
COMMENT ON COLUMN sys_sms_log.status IS '状态 0:失败 1:成功';
|
||||
COMMENT ON COLUMN sys_sms_log.error IS '异常信息';
|
||||
COMMENT ON COLUMN sys_sms_log.create_time IS '创建时间';
|
||||
|
||||
|
||||
CREATE TABLE sys_mail_config
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
platform int,
|
||||
group_name varchar(100),
|
||||
mail_host varchar(100),
|
||||
mail_port int,
|
||||
mail_from varchar(100),
|
||||
mail_pass varchar(100),
|
||||
region_id varchar(100),
|
||||
endpoint varchar(100),
|
||||
access_key varchar(100),
|
||||
secret_key varchar(100),
|
||||
status int,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_mail_config IS '邮件平台';
|
||||
COMMENT ON COLUMN sys_mail_config.id IS 'id';
|
||||
COMMENT ON COLUMN sys_mail_config.platform IS '平台类型 -1:本地 0:阿里云';
|
||||
COMMENT ON COLUMN sys_mail_config.group_name IS '分组名称,发送邮件时,可指定分组';
|
||||
COMMENT ON COLUMN sys_mail_config.mail_host IS 'SMTP服务器';
|
||||
COMMENT ON COLUMN sys_mail_config.mail_port IS 'SMTP端口';
|
||||
COMMENT ON COLUMN sys_mail_config.mail_from IS '发件人邮箱';
|
||||
COMMENT ON COLUMN sys_mail_config.mail_pass IS '发件人密码';
|
||||
COMMENT ON COLUMN sys_mail_config.region_id IS 'regionId';
|
||||
COMMENT ON COLUMN sys_mail_config.endpoint IS '阿里云 endpoint';
|
||||
COMMENT ON COLUMN sys_mail_config.access_key IS 'AccessKey';
|
||||
COMMENT ON COLUMN sys_mail_config.secret_key IS 'SecretKey';
|
||||
COMMENT ON COLUMN sys_mail_config.status IS '状态 0:禁用 1:启用';
|
||||
COMMENT ON COLUMN sys_mail_config.version IS '版本号';
|
||||
COMMENT ON COLUMN sys_mail_config.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN sys_mail_config.creator IS '创建者';
|
||||
COMMENT ON COLUMN sys_mail_config.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN sys_mail_config.updater IS '更新者';
|
||||
COMMENT ON COLUMN sys_mail_config.update_time IS '更新时间';
|
||||
|
||||
|
||||
CREATE TABLE sys_mail_log
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
platform_id bigint,
|
||||
platform int,
|
||||
mail_from varchar(100),
|
||||
mail_tos varchar(1000),
|
||||
subject varchar(200),
|
||||
content text,
|
||||
status int,
|
||||
error varchar(2000),
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE sys_mail_log IS '邮件日志';
|
||||
COMMENT ON COLUMN sys_mail_log.id IS 'id';
|
||||
COMMENT ON COLUMN sys_mail_log.platform_id IS '平台ID';
|
||||
COMMENT ON COLUMN sys_mail_log.platform IS '平台类型';
|
||||
COMMENT ON COLUMN sys_mail_log.mail_from IS '发件人邮箱';
|
||||
COMMENT ON COLUMN sys_mail_log.mail_tos IS '接受人邮箱';
|
||||
COMMENT ON COLUMN sys_mail_log.subject IS '邮件主题';
|
||||
COMMENT ON COLUMN sys_mail_log.content IS '邮件内容';
|
||||
COMMENT ON COLUMN sys_mail_log.status IS '状态 0:失败 1:成功';
|
||||
COMMENT ON COLUMN sys_mail_log.error IS '异常信息';
|
||||
COMMENT ON COLUMN sys_mail_log.create_time IS '创建时间';
|
||||
|
||||
|
||||
SET IDENTITY_INSERT sys_user ON;
|
||||
INSERT INTO sys_user (id, username, password, real_name, avatar, gender, email, mobile, status, org_id, super_admin, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (10000, 'admin', 'dc1fd00e3eeeb940ff46f457bf97d66ba7fcc36e0b20802383de142860e76ae6', 'admin', 'https://cdn.maku.net/images/avatar.png', 0, 'babamu@126.com', '13612345678', 1, null, 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
SET IDENTITY_INSERT sys_menu ON;
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1, NULL, '系统设置', NULL, NULL, 0, 0, 'icon-setting', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (2, 1, '菜单管理', 'sys/menu/index', NULL, 0, 0, 'icon-menu', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (3, 2, '查看', '', 'sys:menu:list', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (4, 2, '新增', '', 'sys:menu:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (5, 2, '修改', '', 'sys:menu:update,sys:menu:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (6, 2, '删除', '', 'sys:menu:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (7, 1, '数据字典', 'sys/dict/type', '', 0, 0, 'icon-insertrowabove', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (8, 7, '查询', '', 'sys:dict:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (9, 7, '新增', '', 'sys:dict:save', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (10, 7, '修改', '', 'sys:dict:update,sys:dict:info', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (11, 7, '删除', '', 'sys:dict:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (12, NULL, '权限管理', '', '', 0, 0, 'icon-safetycertificate', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (13, 12, '岗位管理', 'sys/post/index', '', 0, 0, 'icon-solution', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (14, 13, '查询', '', 'sys:post:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (15, 13, '新增', '', 'sys:post:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (16, 13, '修改', '', 'sys:post:update,sys:post:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (17, 13, '删除', '', 'sys:post:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (18, 12, '机构管理', 'sys/org/index', '', 0, 0, 'icon-cluster', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (19, 18, '查询', '', 'sys:org:list', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (20, 18, '新增', '', 'sys:org:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (21, 18, '修改', '', 'sys:org:update,sys:org:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (22, 18, '删除', '', 'sys:org:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (23, 12, '角色管理', 'sys/role/index', '', 0, 0, 'icon-team', 3, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (24, 23, '查询', '', 'sys:role:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (25, 23, '新增', '', 'sys:role:save,sys:role:menu,sys:org:list', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (26, 23, '修改', '', 'sys:role:update,sys:role:info,sys:role:menu,sys:org:list,sys:user:page', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (27, 23, '删除', '', 'sys:role:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (28, 12, '用户管理', 'sys/user/index', '', 0, 0, 'icon-user', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (29, 28, '查询', '', 'sys:user:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (30, 28, '新增', '', 'sys:user:save,sys:role:list', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (31, 28, '修改', '', 'sys:user:update,sys:user:info,sys:role:list', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (32, 28, '删除', '', 'sys:user:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (33, NULL, '应用管理', '', '', 0, 0, 'icon-appstore', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (34, NULL, '日志管理', '', '', 0, 0, 'icon-filedone', 3, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (35, 34, '登录日志', 'sys/log/login', 'sys:log:login', 0, 0, 'icon-solution', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (36, 28, '导入', '', 'sys:user:import', 1, 0, '', 5, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (37, 28, '导出', '', 'sys:user:export', 1, 0, '', 6, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (38, 1, '参数管理', 'sys/params/index', 'sys:params:all', 0, 0, 'icon-filedone', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (39, 1, '接口文档', '{{apiUrl}}/doc.html', null, 0, 1, 'icon-file-text-fill', 10, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (40, 34, '操作日志', 'sys/log/operate', 'sys:operate:all', 0, 0, 'icon-file-text', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (41, 1, '系统配置', 'sys/config/index', null, 0, 0, 'icon-safetycertificate', 4, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (42, 41, '短信配置', '', 'sys:sms:config', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (43, 41, '邮件配置', '', 'sys:mail:config', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (44, 41, '第三方登录', '', 'sys:third:config', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (45, NULL, '基础工具', '', '', 0, 0, 'icon-wrench-fill', 5, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (46, 45, '短信发送', 'sys/tool/sms/index', 'sys:sms:log', 0, 0, 'icon-message', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (47, 45, '邮件发送', 'sys/tool/mail/index', 'sys:mail:log', 0, 0, 'icon-mail', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (48, 45, '附件管理', 'sys/attachment/index', NULL, 0, 0, 'icon-folder-fill', 3, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (49, 48, '查看', '', 'sys:attachment:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (50, 48, '上传', '', 'sys:attachment:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (51, 48, '删除', '', 'sys:attachment:delete', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (52, NULL, '企业版', 'https://maku.net/price', NULL, 0, 1, 'icon-safetycertificate', 10, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
SET IDENTITY_INSERT sys_dict_type ON;
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1, 'post_status', '状态', '岗位管理', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (2, 'user_gender', '性别', '用户管理', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (3, 'user_status', '状态', '用户管理', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (4, 'role_data_scope', '数据范围', '角色管理', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (5, 'enable_disable', '状态', '功能状态:启用 | 禁用 ', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (6, 'success_fail', '状态', '操作状态:成功 | 失败', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (7, 'login_operation', '操作信息', '登录管理', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (8, 'params_type', '系统参数', '参数管理', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (9, 'user_super_admin', '用户是否是超管','用户是否是超管', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (10, 'log_operate_type', '操作类型', '操作日志', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (11, 'sms_platform', '短信平台类型', '短信管理', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (12, 'mail_platform', '邮件平台类型', '邮件管理', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
SET IDENTITY_INSERT sys_dict_data ON;
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1, 1, '停用', '0', 'danger', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (2, 1, '正常', '1', 'primary', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (3, 2, '男', '0', 'primary', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (4, 2, '女', '1', 'success', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (5, 2, '未知', '2', 'warning', '', 2, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (6, 3, '正常', '1', 'primary', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (7, 3, '停用', '0', 'danger', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (8, 4, '全部数据', '0', '', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (9, 4, '本机构及子机构数据', '1', '', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (10, 4, '本机构数据', '2', '', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (11, 4, '本人数据', '3', '', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (12, 4, '自定义数据', '4', '', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (13, 5, '禁用', '0', 'danger', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (14, 5, '启用', '1', 'primary', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (15, 6, '失败', '0', 'danger', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (16, 6, '成功', '1', 'primary', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (17, 7, '登录成功', '0', 'primary', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (18, 7, '退出成功', '1', 'warning', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (19, 7, '验证码错误', '2', 'danger', '', 2, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (20, 7, '账号密码错误', '3', 'danger', '', 3, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (21, 8, '否', '0', 'primary', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (22, 8, '是', '1', 'danger', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (23, 9, '是', '1', 'danger', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (24, 9, '否', '0', 'primary', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (25, 10, '其它', '0', 'info', '', 10, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (26, 10, '查询', '1', 'primary', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (27, 10, '新增', '2', 'success', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (28, 10, '修改', '3', 'warning', '', 2, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (29, 10, '删除', '4', 'danger', '', 3, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (30, 10, '导出', '5', 'info', '', 4, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (31, 10, '导入', '6', 'info', '', 5, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (32, 11, '阿里云', '0', '', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (33, 11, '腾讯云', '1', '', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (34, 11, '七牛云', '2', '', '', 2, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (35, 11, '华为云', '3', '', '', 3, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (36, 12, '本地', '-1', '', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (id, dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (37, 12, '阿里云', '0', '', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
INSERT INTO sys_params (param_name, param_type, param_key, param_value, remark, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES ('用户登录-验证码开关', 1, 'LOGIN_CAPTCHA', 'false', '是否开启验证码(true:开启,false:关闭)', 10000, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
INSERT INTO sys_third_login_config (open_type, client_id, client_secret, redirect_uri, agent_id, tenant_id, version, deleted, create_time) VALUES ('feishu', 'cli_a541d3aa03f8500b', '5Chz39zvEhZtxSVZz3vLjfQHdkvavQaH', 'http://localhost:8080/sys/third/callback/feishu', '', 10000, 0, 0, now());
|
||||
|
||||
INSERT INTO sys_mail_config (platform, group_name, mail_host, mail_port, mail_from, mail_pass, region_id, endpoint, access_key, secret_key, status, version, deleted, creator, create_time, updater, update_time) VALUES (-1, 'test', NULL, NULL, 'baba_tv@163.com', 'TZNVURLYVBNJUNBB', '', '', NULL, NULL, 1, 1, 0, 10000, now(), 10000, now());
|
||||
commit;
|
||||
|
|
@ -1,468 +0,0 @@
|
|||
INSERT INTO sys_menu (pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (33, '代码生成器', '{{apiUrl}}/maku-generator/index.html', '', 0, 0, 'icon-rocket', 2, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
CREATE TABLE gen_datasource (
|
||||
id bigint IDENTITY NOT NULL,
|
||||
db_type varchar(200),
|
||||
conn_name varchar(200),
|
||||
conn_url varchar(500),
|
||||
username varchar(200),
|
||||
password varchar(200),
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE gen_datasource IS '数据源管理';
|
||||
COMMENT ON COLUMN gen_datasource.id IS 'id';
|
||||
COMMENT ON COLUMN gen_datasource.db_type IS '数据库类型';
|
||||
COMMENT ON COLUMN gen_datasource.conn_name IS '连接名';
|
||||
COMMENT ON COLUMN gen_datasource.conn_url IS 'URL';
|
||||
COMMENT ON COLUMN gen_datasource.username IS '用户名';
|
||||
COMMENT ON COLUMN gen_datasource.password IS '密码';
|
||||
COMMENT ON COLUMN gen_datasource.create_time IS '创建时间';
|
||||
|
||||
CREATE TABLE gen_config
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
config_key varchar(200),
|
||||
config_value varchar(2000),
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
CREATE TABLE gen_field_type
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
column_type varchar(200),
|
||||
attr_type varchar(200),
|
||||
package_name varchar(200),
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX gen_column_type on gen_field_type(column_type);
|
||||
|
||||
COMMENT ON TABLE gen_field_type IS '字段类型管理';
|
||||
COMMENT ON COLUMN gen_field_type.id IS 'id';
|
||||
COMMENT ON COLUMN gen_field_type.column_type IS '字段类型';
|
||||
COMMENT ON COLUMN gen_field_type.attr_type IS '属性类型';
|
||||
COMMENT ON COLUMN gen_field_type.package_name IS '属性包名';
|
||||
COMMENT ON COLUMN gen_field_type.create_time IS '创建时间';
|
||||
|
||||
|
||||
CREATE TABLE gen_base_class
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
package_name varchar(200),
|
||||
code varchar(200),
|
||||
fields varchar(500),
|
||||
remark varchar(200),
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE gen_base_class IS '基类管理';
|
||||
COMMENT ON COLUMN gen_base_class.id IS 'id';
|
||||
COMMENT ON COLUMN gen_base_class.package_name IS '基类包名';
|
||||
COMMENT ON COLUMN gen_base_class.code IS '基类编码';
|
||||
COMMENT ON COLUMN gen_base_class.fields IS '基类字段,多个用英文逗号分隔';
|
||||
COMMENT ON COLUMN gen_base_class.remark IS '备注';
|
||||
COMMENT ON COLUMN gen_base_class.create_time IS '创建时间';
|
||||
|
||||
CREATE TABLE gen_table
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
table_name varchar(200),
|
||||
class_name varchar(200),
|
||||
table_comment varchar(200),
|
||||
author varchar(200),
|
||||
email varchar(200),
|
||||
package_name varchar(200),
|
||||
version varchar(200),
|
||||
generator_type int,
|
||||
backend_path varchar(500),
|
||||
frontend_path varchar(500),
|
||||
module_name varchar(200),
|
||||
function_name varchar(200),
|
||||
form_layout int,
|
||||
table_type int,
|
||||
sub_table varchar(4000),
|
||||
table_operation varchar(200),
|
||||
auth_level int,
|
||||
open_type int,
|
||||
request_url varchar(200),
|
||||
authority varchar(200),
|
||||
tree_id varchar(200),
|
||||
tree_pid varchar(200),
|
||||
tree_label varchar(200),
|
||||
left_title varchar(200),
|
||||
left_from int,
|
||||
left_table_name varchar(200),
|
||||
left_url varchar(200),
|
||||
left_relation_field varchar(200),
|
||||
datasource_id bigint,
|
||||
baseclass_id bigint,
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
CREATE UNIQUE INDEX gen_table_name on gen_table(table_name);
|
||||
|
||||
COMMENT ON TABLE gen_table IS '代码生成表';
|
||||
COMMENT ON COLUMN gen_table.id IS 'id';
|
||||
COMMENT ON COLUMN gen_table.table_name IS '表名';
|
||||
COMMENT ON COLUMN gen_table.class_name IS '类名';
|
||||
COMMENT ON COLUMN gen_table.table_comment IS '说明';
|
||||
COMMENT ON COLUMN gen_table.author IS '作者';
|
||||
COMMENT ON COLUMN gen_table.email IS '邮箱';
|
||||
COMMENT ON COLUMN gen_table.package_name IS '项目包名';
|
||||
COMMENT ON COLUMN gen_table.version IS '项目版本号';
|
||||
COMMENT ON COLUMN gen_table.generator_type IS '生成方式 0:zip压缩包 1:自定义目录';
|
||||
COMMENT ON COLUMN gen_table.backend_path IS '后端生成路径';
|
||||
COMMENT ON COLUMN gen_table.frontend_path IS '前端生成路径';
|
||||
COMMENT ON COLUMN gen_table.module_name IS '模块名';
|
||||
COMMENT ON COLUMN gen_table.function_name IS '功能名';
|
||||
COMMENT ON COLUMN gen_table.form_layout IS '表单布局 1:一列 2:两列';
|
||||
COMMENT ON COLUMN gen_table.datasource_id IS '数据源ID';
|
||||
COMMENT ON COLUMN gen_table.baseclass_id IS '基类ID';
|
||||
COMMENT ON COLUMN gen_table.create_time IS '创建时间';
|
||||
|
||||
|
||||
CREATE TABLE gen_table_field
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
table_id bigint,
|
||||
field_name varchar(200),
|
||||
field_type varchar(200),
|
||||
field_comment varchar(200),
|
||||
attr_name varchar(200),
|
||||
attr_type varchar(200),
|
||||
package_name varchar(200),
|
||||
sort int,
|
||||
auto_fill varchar(20),
|
||||
primary_pk bit,
|
||||
base_field bit,
|
||||
form_item bit,
|
||||
form_required bit,
|
||||
form_type varchar(200),
|
||||
form_dict varchar(200),
|
||||
form_validator varchar(200),
|
||||
grid_item bit,
|
||||
grid_sort bit,
|
||||
query_item bit,
|
||||
query_type varchar(200),
|
||||
query_form_type varchar(200),
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE gen_table_field IS '代码生成表字段';
|
||||
COMMENT ON COLUMN gen_table_field.id IS 'id';
|
||||
COMMENT ON COLUMN gen_table_field.table_id IS '表ID';
|
||||
COMMENT ON COLUMN gen_table_field.field_name IS '字段名称';
|
||||
COMMENT ON COLUMN gen_table_field.field_type IS '字段类型';
|
||||
COMMENT ON COLUMN gen_table_field.field_comment IS '字段说明';
|
||||
COMMENT ON COLUMN gen_table_field.attr_name IS '属性名';
|
||||
COMMENT ON COLUMN gen_table_field.attr_type IS '属性类型';
|
||||
COMMENT ON COLUMN gen_table_field.package_name IS '属性包名';
|
||||
COMMENT ON COLUMN gen_table_field.sort IS '排序';
|
||||
COMMENT ON COLUMN gen_table_field.auto_fill IS '自动填充 DEFAULT、INSERT、UPDATE、INSERT_UPDATE';
|
||||
COMMENT ON COLUMN gen_table_field.primary_pk IS '主键 0:否 1:是';
|
||||
COMMENT ON COLUMN gen_table_field.base_field IS '基类字段 0:否 1:是';
|
||||
COMMENT ON COLUMN gen_table_field.form_item IS '表单项 0:否 1:是';
|
||||
COMMENT ON COLUMN gen_table_field.form_required IS '表单必填 0:否 1:是';
|
||||
COMMENT ON COLUMN gen_table_field.form_type IS '表单类型';
|
||||
COMMENT ON COLUMN gen_table_field.form_dict IS '表单字典类型';
|
||||
COMMENT ON COLUMN gen_table_field.form_validator IS '表单效验';
|
||||
COMMENT ON COLUMN gen_table_field.grid_item IS '列表项 0:否 1:是';
|
||||
COMMENT ON COLUMN gen_table_field.grid_sort IS '列表排序 0:否 1:是';
|
||||
COMMENT ON COLUMN gen_table_field.query_item IS '查询项 0:否 1:是';
|
||||
COMMENT ON COLUMN gen_table_field.query_type IS '查询方式';
|
||||
COMMENT ON COLUMN gen_table_field.query_form_type IS '查询表单类型';
|
||||
|
||||
|
||||
CREATE TABLE gen_project_modify
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
project_name varchar(100),
|
||||
project_code varchar(100),
|
||||
project_package varchar(100),
|
||||
project_path varchar(200),
|
||||
modify_project_name varchar(100),
|
||||
modify_project_code varchar(100),
|
||||
modify_project_package varchar(100),
|
||||
exclusions varchar(200),
|
||||
modify_suffix varchar(200),
|
||||
modify_tmp_path varchar(100),
|
||||
create_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE gen_project_modify IS '项目名变更';
|
||||
COMMENT ON COLUMN gen_project_modify.id IS 'id';
|
||||
COMMENT ON COLUMN gen_project_modify.project_name IS '项目名';
|
||||
COMMENT ON COLUMN gen_project_modify.project_code IS '项目标识';
|
||||
COMMENT ON COLUMN gen_project_modify.project_package IS '项目包名';
|
||||
COMMENT ON COLUMN gen_project_modify.project_path IS '项目路径';
|
||||
COMMENT ON COLUMN gen_project_modify.modify_project_name IS '变更项目名';
|
||||
COMMENT ON COLUMN gen_project_modify.modify_project_code IS '变更标识';
|
||||
COMMENT ON COLUMN gen_project_modify.modify_project_package IS '变更包名';
|
||||
COMMENT ON COLUMN gen_project_modify.exclusions IS '排除文件';
|
||||
COMMENT ON COLUMN gen_project_modify.modify_suffix IS '变更文件';
|
||||
COMMENT ON COLUMN gen_project_modify.modify_tmp_path IS '变更临时路径';
|
||||
COMMENT ON COLUMN gen_project_modify.create_time IS '创建时间';
|
||||
|
||||
|
||||
-- 用于测试代码生成器的表结构 --
|
||||
CREATE TABLE gen_test_member
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
name varchar(50),
|
||||
gender int,
|
||||
age int,
|
||||
tenant_id bigint,
|
||||
create_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE gen_test_member IS '单表测试';
|
||||
COMMENT ON COLUMN gen_test_member.id IS 'id';
|
||||
COMMENT ON COLUMN gen_test_member.name IS '姓名';
|
||||
COMMENT ON COLUMN gen_test_member.gender IS '性别';
|
||||
COMMENT ON COLUMN gen_test_member.age IS '年龄';
|
||||
COMMENT ON COLUMN gen_test_member.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN gen_test_member.create_time IS '创建时间';
|
||||
|
||||
|
||||
|
||||
CREATE TABLE gen_test_tree
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
parent_id bigint,
|
||||
tree_name varchar(100),
|
||||
tenant_id bigint,
|
||||
create_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE gen_test_tree IS '树表测试';
|
||||
COMMENT ON COLUMN gen_test_tree.id IS 'id';
|
||||
COMMENT ON COLUMN gen_test_tree.parent_id IS '上级ID';
|
||||
COMMENT ON COLUMN gen_test_tree.tree_name IS '名称';
|
||||
COMMENT ON COLUMN gen_test_tree.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN gen_test_tree.create_time IS '创建时间';
|
||||
|
||||
CREATE TABLE gen_test_product
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
name varchar(100),
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE gen_test_product IS '产品测试';
|
||||
COMMENT ON COLUMN gen_test_product.id IS 'id';
|
||||
COMMENT ON COLUMN gen_test_product.name IS '名称';
|
||||
|
||||
CREATE TABLE gen_test_product_info
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
images varchar(2000),
|
||||
intro varchar(5000),
|
||||
product_id bigint,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE gen_test_product_info IS '产品信息';
|
||||
COMMENT ON COLUMN gen_test_product_info.id IS 'id';
|
||||
COMMENT ON COLUMN gen_test_product_info.images IS '图片';
|
||||
COMMENT ON COLUMN gen_test_product_info.intro IS '介绍';
|
||||
COMMENT ON COLUMN gen_test_product_info.product_id IS '产品ID';
|
||||
|
||||
|
||||
CREATE TABLE gen_test_product_param
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
param_name varchar(200),
|
||||
param_value varchar(200),
|
||||
product_id bigint,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE gen_test_product_param IS '产品参数';
|
||||
COMMENT ON COLUMN gen_test_product_param.id IS 'id';
|
||||
COMMENT ON COLUMN gen_test_product_param.param_name IS '参数名称';
|
||||
COMMENT ON COLUMN gen_test_product_param.param_value IS '参数值';
|
||||
COMMENT ON COLUMN gen_test_product_param.product_id IS '产品ID';
|
||||
|
||||
CREATE TABLE gen_test_goods_category
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
name varchar(100),
|
||||
pid bigint,
|
||||
tenant_id bigint,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE gen_test_goods_category IS '商品分类';
|
||||
COMMENT ON COLUMN gen_test_goods_category.id IS 'id';
|
||||
COMMENT ON COLUMN gen_test_goods_category.name IS '名称';
|
||||
COMMENT ON COLUMN gen_test_goods_category.pid IS '上级ID';
|
||||
|
||||
CREATE TABLE gen_test_goods
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
name varchar(100),
|
||||
intro varchar(5000),
|
||||
category_id bigint,
|
||||
tenant_id bigint,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE gen_test_goods IS '商品管理';
|
||||
COMMENT ON COLUMN gen_test_goods.id IS 'id';
|
||||
COMMENT ON COLUMN gen_test_goods.name IS '名称';
|
||||
COMMENT ON COLUMN gen_test_goods.intro IS '介绍';
|
||||
COMMENT ON COLUMN gen_test_goods.category_id IS '分类ID';
|
||||
|
||||
|
||||
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('datetime', 'LocalDateTime', 'java.time.LocalDateTime', now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('date', 'LocalDateTime', 'java.time.LocalDateTime', now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('tinyint', 'Integer', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('smallint', 'Integer', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('mediumint', 'Integer', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('int', 'Integer', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('integer', 'Integer', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('bigint', 'Long', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('float', 'Float', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('double', 'Double', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('decimal', 'BigDecimal', 'java.math.BigDecimal', now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('bit', 'Boolean', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('char', 'String', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('varchar', 'String', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('tinytext', 'String', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('text', 'String', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('mediumtext', 'String', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('longtext', 'String', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('timestamp', 'LocalDateTime', 'java.time.LocalDateTime', now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('NUMBER', 'Integer', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('BINARY_INTEGER', 'Integer', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('BINARY_FLOAT', 'Float', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('BINARY_DOUBLE', 'Double', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('VARCHAR2', 'String', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('NVARCHAR', 'String', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('NVARCHAR2', 'String', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('CLOB', 'String', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('int8', 'Long', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('int4', 'Integer', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('int2', 'Integer', NULL, now());
|
||||
INSERT INTO gen_field_type (column_type, attr_type, package_name, create_time) VALUES ('numeric', 'BigDecimal', 'java.math.BigDecimal', now());
|
||||
|
||||
INSERT INTO gen_base_class (package_name, code, fields, remark, create_time) VALUES ('net.maku.framework.mybatis.entity', 'BaseEntity', 'id,creator,create_time,updater,update_time,version,deleted', '使用该基类,则需要表里有这些字段', now());
|
||||
|
||||
INSERT INTO gen_project_modify (project_name, project_code, project_package, project_path, modify_project_name, modify_project_code, modify_project_package, exclusions, modify_suffix, create_time) VALUES ('maku-boot', 'maku', 'net.maku', 'D:/makunet/maku-boot', 'baba-boot', 'baba', 'com.baba', '.git,.idea,target,logs', 'java,xml,yml,txt', now());
|
||||
INSERT INTO gen_project_modify (project_name, project_code, project_package, project_path, modify_project_name, modify_project_code, modify_project_package, exclusions, modify_suffix, create_time) VALUES ('maku-cloud', 'maku', 'net.maku', 'D:/makunet/maku-cloud', 'baba-cloud', 'baba', 'com.baba', '.git,.idea,target,logs', 'java,xml,yml,txt', now());
|
||||
|
||||
INSERT INTO gen_config (config_key, config_value) VALUES ('gen_config', '');
|
||||
|
||||
INSERT INTO gen_table (id, table_name, class_name, table_comment, author, email, package_name, version, generator_type, backend_path, frontend_path, module_name, function_name, form_layout, table_type, sub_table, table_operation, auth_level, open_type, request_url, authority, tree_id, tree_pid, tree_label, datasource_id, baseclass_id, create_time, left_from, left_table_name, left_url, left_relation_field, left_title) VALUES (20, 'gen_test_member', 'GenTestMember', '单表测试', '阿沐', 'babamu@126.com', 'net.maku', '', 1, '/Users/maku/makunet/maku-boot-enterprise/maku-boot-new', '/Users/maku/makunet/maku-admin-enterprise', 'test', 'member', 1, 0, NULL, '[\"query\",\"insert\",\"update\",\"delete\",\"export\",\"import\"]', 0, 0, '/test/member', 'test:member', NULL, NULL, NULL, 0, NULL, now(), NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO gen_table (id, table_name, class_name, table_comment, author, email, package_name, version, generator_type, backend_path, frontend_path, module_name, function_name, form_layout, table_type, sub_table, table_operation, auth_level, open_type, request_url, authority, tree_id, tree_pid, tree_label, datasource_id, baseclass_id, create_time, left_from, left_table_name, left_url, left_relation_field, left_title) VALUES (21, 'gen_test_tree', 'GenTestTree', '树表测试', '阿沐', 'babamu@126.com', 'net.maku', '', 1, '/Users/maku/makunet/maku-boot-enterprise/maku-boot-new', '/Users/maku/makunet/maku-admin-enterprise', 'test', 'tree', 1, 1, NULL, '[\"query\",\"insert\",\"update\",\"delete\",\"export\"]', 0, 0, '/test/tree', 'test:tree', 'id', 'parent_id', 'tree_name', 0, NULL, now(), NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO gen_table (id, table_name, class_name, table_comment, author, email, package_name, version, generator_type, backend_path, frontend_path, module_name, function_name, form_layout, table_type, sub_table, table_operation, auth_level, open_type, request_url, authority, tree_id, tree_pid, tree_label, datasource_id, baseclass_id, create_time, left_from, left_table_name, left_url, left_relation_field, left_title) VALUES (22, 'gen_test_goods', 'GenTestGoods', '商品管理', '阿沐', 'babamu@126.com', 'net.maku', '', 1, '/Users/maku/makunet/maku-boot-enterprise/maku-boot-new', '/Users/maku/makunet/maku-admin-enterprise', 'test', 'goods', 1, 2, '[]', '[\"query\",\"insert\",\"update\",\"delete\"]', 0, 0, '/test/goods', 'test:goods', NULL, NULL, NULL, 0, NULL, now(), 0, 'gen_test_goods_category', '/test/category/list', 'category_id', '分类列表');
|
||||
INSERT INTO gen_table (id, table_name, class_name, table_comment, author, email, package_name, version, generator_type, backend_path, frontend_path, module_name, function_name, form_layout, table_type, sub_table, table_operation, auth_level, open_type, request_url, authority, tree_id, tree_pid, tree_label, datasource_id, baseclass_id, create_time, left_from, left_table_name, left_url, left_relation_field, left_title) VALUES (23, 'gen_test_goods_category', 'GenTestGoodsCategory', '商品分类', '阿沐', 'babamu@126.com', 'net.maku', '', 1, '/Users/maku/makunet/maku-boot-enterprise/maku-boot-new', '/Users/maku/makunet/maku-admin-enterprise', 'test', 'category', 1, 1, '[]', '[\"query\",\"insert\",\"update\",\"delete\"]', 0, 0, '/test/category', 'test:category', 'id', 'pid', 'name', 0, NULL, now(), NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO gen_table (id, table_name, class_name, table_comment, author, email, package_name, version, generator_type, backend_path, frontend_path, module_name, function_name, form_layout, table_type, sub_table, table_operation, auth_level, open_type, request_url, authority, tree_id, tree_pid, tree_label, datasource_id, baseclass_id, create_time, left_from, left_table_name, left_url, left_relation_field, left_title) VALUES (24, 'gen_test_product_info', 'GenTestProductInfo', '产品信息', '阿沐', 'babamu@126.com', 'net.maku', '', 0, '/Users/maku/makunet/maku-boot-enterprise/maku-boot-new', '/Users/maku/makunet/maku-admin-enterprise', 'test', 'info', 1, 0, NULL, '[\"query\",\"insert\",\"update\",\"delete\",\"export\"]', 0, 0, '/test/info', 'test:info', NULL, NULL, NULL, 0, NULL, now(), NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO gen_table (id, table_name, class_name, table_comment, author, email, package_name, version, generator_type, backend_path, frontend_path, module_name, function_name, form_layout, table_type, sub_table, table_operation, auth_level, open_type, request_url, authority, tree_id, tree_pid, tree_label, datasource_id, baseclass_id, create_time, left_from, left_table_name, left_url, left_relation_field, left_title) VALUES (25, 'gen_test_product_param', 'GenTestProductParam', '产品参数', '阿沐', 'babamu@126.com', 'net.maku', '', 0, '/Users/maku/makunet/maku-boot-enterprise/maku-boot-new', '/Users/maku/makunet/maku-admin-enterprise', 'test', 'param', 1, 0, NULL, '[\"query\",\"insert\",\"update\",\"delete\",\"export\"]', 0, 0, '/test/param', 'test:param', NULL, NULL, NULL, 0, NULL, now(), NULL, NULL, NULL, NULL, NULL);
|
||||
INSERT INTO gen_table (id, table_name, class_name, table_comment, author, email, package_name, version, generator_type, backend_path, frontend_path, module_name, function_name, form_layout, table_type, sub_table, table_operation, auth_level, open_type, request_url, authority, tree_id, tree_pid, tree_label, datasource_id, baseclass_id, create_time, left_from, left_table_name, left_url, left_relation_field, left_title) VALUES (26, 'gen_test_product', 'GenTestProduct', '产品测试', '阿沐', 'babamu@126.com', 'net.maku', '', 1, '/Users/maku/makunet/maku-boot-enterprise/maku-boot-new', '/Users/maku/makunet/maku-admin-enterprise', 'test', 'product', 1, 0, '[{\"tableName\":\"gen_test_product_info\",\"foreignKey\":\"product_id\",\"tableTitle\":\"产品信息\",\"mainRelation\":1,\"sort\":0},{\"tableName\":\"gen_test_product_param\",\"foreignKey\":\"product_id\",\"tableTitle\":\"产品参数\",\"mainRelation\":2,\"sort\":1}]', '[\"query\",\"insert\",\"update\",\"delete\"]', 0, 1, '/test/product', 'test:product', NULL, NULL, NULL, 0, NULL, now(), NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (220, 20, 'id', 'bigint', 'ID', 'id', 'Long', NULL, 0, 'DEFAULT', 1, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (221, 20, 'name', 'varchar', '姓名', 'name', 'String', NULL, 1, 'DEFAULT', 0, 0, 1, 1, 'input', NULL, NULL, 1, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (222, 20, 'gender', 'tinyint', '性别', 'gender', 'Integer', NULL, 2, 'DEFAULT', 0, 0, 1, 1, 'radio', 'user_gender', NULL, 1, 0, 1, '=', 'select', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (223, 20, 'age', 'int', '年龄', 'age', 'Integer', NULL, 3, 'DEFAULT', 0, 0, 1, 1, 'number', NULL, NULL, 1, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (224, 20, 'tenant_id', 'bigint', '租户ID', 'tenantId', 'Long', NULL, 4, 'DEFAULT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (225, 20, 'version', 'int', '版本号', 'version', 'Integer', NULL, 5, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (226, 20, 'deleted', 'tinyint', '删除标识', 'deleted', 'Integer', NULL, 6, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (227, 20, 'create_time', 'datetime', '创建时间', 'createTime', 'LocalDateTime', 'java.time.LocalDateTime', 7, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (228, 21, 'id', 'bigint', 'ID', 'id', 'Long', NULL, 0, 'DEFAULT', 1, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (229, 21, 'tree_name', 'varchar', '名称', 'treeName', 'String', NULL, 1, 'DEFAULT', 0, 0, 1, 1, 'input', NULL, NULL, 1, 0, 1, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (230, 21, 'parent_id', 'bigint', '上级ID', 'parentId', 'Long', NULL, 2, 'DEFAULT', 0, 0, 1, 0, 'treeselect', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (231, 21, 'tenant_id', 'bigint', '租户ID', 'tenantId', 'Long', NULL, 3, 'DEFAULT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (232, 21, 'create_time', 'datetime', '创建时间', 'createTime', 'LocalDateTime', 'java.time.LocalDateTime', 4, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 1, 0, 1, '=', 'date', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (233, 22, 'id', 'bigint', 'ID', 'id', 'Long', NULL, 0, 'DEFAULT', 1, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (234, 22, 'name', 'varchar', '名称', 'name', 'String', NULL, 1, 'DEFAULT', 0, 0, 1, 1, 'input', NULL, NULL, 1, 0, 1, 'like', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (235, 22, 'intro', 'varchar', '介绍', 'intro', 'String', NULL, 2, 'DEFAULT', 0, 0, 1, 1, 'input', NULL, NULL, 1, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (236, 22, 'category_id', 'bigint', '分类ID', 'categoryId', 'Long', NULL, 3, 'DEFAULT', 0, 0, 1, 1, 'input', NULL, NULL, 1, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (237, 22, 'tenant_id', 'bigint', '租户ID', 'tenantId', 'Long', NULL, 4, 'DEFAULT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (238, 22, 'deleted', 'tinyint', '删除标识', 'deleted', 'Integer', NULL, 5, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (239, 22, 'creator', 'bigint', '创建者', 'creator', 'Long', NULL, 6, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (240, 22, 'create_time', 'datetime', '创建时间', 'createTime', 'LocalDateTime', 'java.time.LocalDateTime', 7, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (241, 22, 'updater', 'bigint', '更新者', 'updater', 'Long', NULL, 8, 'INSERT_UPDATE', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (242, 22, 'update_time', 'datetime', '更新时间', 'updateTime', 'LocalDateTime', 'java.time.LocalDateTime', 9, 'INSERT_UPDATE', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (243, 23, 'id', 'bigint', 'ID', 'id', 'Long', NULL, 0, 'DEFAULT', 1, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (244, 23, 'name', 'varchar', '名称', 'name', 'String', NULL, 2, 'DEFAULT', 0, 0, 1, 1, 'input', NULL, NULL, 1, 0, 1, 'like', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (245, 23, 'pid', 'bigint', '上级ID', 'pid', 'Long', NULL, 1, 'DEFAULT', 0, 0, 1, 0, 'treeselect', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (246, 23, 'tenant_id', 'bigint', '租户ID', 'tenantId', 'Long', NULL, 3, 'DEFAULT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (247, 23, 'deleted', 'tinyint', '删除标识', 'deleted', 'Integer', NULL, 4, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (248, 23, 'creator', 'bigint', '创建者', 'creator', 'Long', NULL, 5, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (249, 23, 'create_time', 'datetime', '创建时间', 'createTime', 'LocalDateTime', 'java.time.LocalDateTime', 6, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 1, 0, 1, '=', 'datetime', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (250, 23, 'updater', 'bigint', '更新者', 'updater', 'Long', NULL, 7, 'INSERT_UPDATE', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (251, 23, 'update_time', 'datetime', '更新时间', 'updateTime', 'LocalDateTime', 'java.time.LocalDateTime', 8, 'INSERT_UPDATE', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (252, 24, 'id', 'bigint', 'ID', 'id', 'Long', NULL, 0, 'DEFAULT', 1, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (253, 24, 'images', 'varchar', '图片', 'images', 'String', NULL, 1, 'DEFAULT', 0, 0, 1, 1, 'image', NULL, NULL, 1, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (254, 24, 'intro', 'varchar', '介绍', 'intro', 'String', NULL, 2, 'DEFAULT', 0, 0, 1, 1, 'editor', NULL, NULL, 1, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (255, 24, 'product_id', 'bigint', '产品ID', 'productId', 'Long', NULL, 3, 'DEFAULT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (256, 24, 'tenant_id', 'bigint', '租户ID', 'tenantId', 'Long', NULL, 4, 'DEFAULT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (257, 24, 'version', 'int', '版本号', 'version', 'Integer', NULL, 5, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (258, 24, 'deleted', 'tinyint', '删除标识', 'deleted', 'Integer', NULL, 6, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (259, 24, 'creator', 'bigint', '创建者', 'creator', 'Long', NULL, 7, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (260, 24, 'create_time', 'datetime', '创建时间', 'createTime', 'LocalDateTime', 'java.time.LocalDateTime', 8, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (261, 24, 'updater', 'bigint', '更新者', 'updater', 'Long', NULL, 9, 'INSERT_UPDATE', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (262, 24, 'update_time', 'datetime', '更新时间', 'updateTime', 'LocalDateTime', 'java.time.LocalDateTime', 10, 'INSERT_UPDATE', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (263, 25, 'id', 'bigint', 'ID', 'id', 'Long', NULL, 0, 'DEFAULT', 1, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (264, 25, 'param_name', 'varchar', '参数名称', 'paramName', 'String', NULL, 1, 'DEFAULT', 0, 0, 1, 1, 'input', NULL, NULL, 1, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (265, 25, 'param_value', 'varchar', '参数值', 'paramValue', 'String', NULL, 2, 'DEFAULT', 0, 0, 1, 1, 'input', NULL, NULL, 1, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (266, 25, 'product_id', 'bigint', '产品ID', 'productId', 'Long', NULL, 3, 'DEFAULT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (267, 25, 'tenant_id', 'bigint', '租户ID', 'tenantId', 'Long', NULL, 4, 'DEFAULT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (268, 25, 'version', 'int', '版本号', 'version', 'Integer', NULL, 5, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (269, 25, 'deleted', 'tinyint', '删除标识', 'deleted', 'Integer', NULL, 6, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (270, 25, 'creator', 'bigint', '创建者', 'creator', 'Long', NULL, 7, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (271, 25, 'create_time', 'datetime', '创建时间', 'createTime', 'LocalDateTime', 'java.time.LocalDateTime', 8, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 1, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (272, 25, 'updater', 'bigint', '更新者', 'updater', 'Long', NULL, 9, 'INSERT_UPDATE', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (273, 25, 'update_time', 'datetime', '更新时间', 'updateTime', 'LocalDateTime', 'java.time.LocalDateTime', 10, 'INSERT_UPDATE', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (274, 26, 'id', 'bigint', 'ID', 'id', 'Long', NULL, 0, 'DEFAULT', 1, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (275, 26, 'name', 'varchar', '名称', 'name', 'String', NULL, 1, 'DEFAULT', 0, 0, 1, 1, 'input', NULL, NULL, 1, 0, 1, 'like', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (276, 26, 'tenant_id', 'bigint', '租户ID', 'tenantId', 'Long', NULL, 2, 'DEFAULT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (277, 26, 'version', 'int', '版本号', 'version', 'Integer', NULL, 3, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (278, 26, 'deleted', 'tinyint', '删除标识', 'deleted', 'Integer', NULL, 4, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (279, 26, 'creator', 'bigint', '创建者', 'creator', 'Long', NULL, 5, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (280, 26, 'create_time', 'datetime', '创建时间', 'createTime', 'LocalDateTime', 'java.time.LocalDateTime', 6, 'INSERT', 0, 0, 0, 0, 'input', NULL, NULL, 1, 0, 1, '=', 'datetime', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (281, 26, 'updater', 'bigint', '更新者', 'updater', 'Long', NULL, 7, 'INSERT_UPDATE', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
INSERT INTO gen_table_field (id, table_id, field_name, field_type, field_comment, attr_name, attr_type, package_name, sort, auto_fill, primary_pk, base_field, form_item, form_required, form_type, form_dict, form_validator, grid_item, grid_sort, query_item, query_type, query_form_type, create_time) VALUES (282, 26, 'update_time', 'datetime', '更新时间', 'updateTime', 'LocalDateTime', 'java.time.LocalDateTime', 8, 'INSERT_UPDATE', 0, 0, 0, 0, 'input', NULL, NULL, 0, 0, 0, '=', 'input', now());
|
||||
|
||||
commit;
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
CREATE TABLE iot_device (
|
||||
id bigint IDENTITY NOT NULL,
|
||||
code varchar(255),
|
||||
name varchar(255),
|
||||
type int,
|
||||
uid varchar(255),
|
||||
secret varchar(255),
|
||||
app_version varchar(255),
|
||||
battery_percent varchar(10),
|
||||
temperature varchar(10),
|
||||
status int,
|
||||
running_status int DEFAULT 0,
|
||||
protocol_type varchar(20),
|
||||
up_time datetime,
|
||||
down_time datetime,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE iot_device IS '设备表';
|
||||
COMMENT ON COLUMN iot_device.id IS 'id';
|
||||
COMMENT ON COLUMN iot_device.code IS '编码';
|
||||
COMMENT ON COLUMN iot_device.name IS '名称';
|
||||
COMMENT ON COLUMN iot_device.type IS '设备类型,1.手持设备,2.柜体,3传感设备';
|
||||
COMMENT ON COLUMN iot_device.uid IS '唯一标识码';
|
||||
COMMENT ON COLUMN iot_device.secret IS '设备密钥';
|
||||
COMMENT ON COLUMN iot_device.app_version IS 'App版本号';
|
||||
COMMENT ON COLUMN iot_device.battery_percent IS '电池电量百分比';
|
||||
COMMENT ON COLUMN iot_device.status IS '状态,0禁用,1启用';
|
||||
COMMENT ON COLUMN iot_device.running_status IS '运行状态,0.离线状态 1.在线状态 2.正常待机 3.用户使用中 4.OTA升级中';
|
||||
COMMENT ON COLUMN iot_device.protocol_type IS '协议类型';
|
||||
COMMENT ON COLUMN iot_device.up_time IS '上线时间';
|
||||
COMMENT ON COLUMN iot_device.down_time IS '下线时间';
|
||||
COMMENT ON COLUMN iot_device.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN iot_device.version IS '版本号';
|
||||
COMMENT ON COLUMN iot_device.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN iot_device.creator IS '创建者';
|
||||
COMMENT ON COLUMN iot_device.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN iot_device.updater IS '更新者';
|
||||
COMMENT ON COLUMN iot_device.update_time IS '更新时间';
|
||||
|
||||
|
||||
CREATE TABLE iot_device_event_log (
|
||||
id bigint IDENTITY NOT NULL,
|
||||
device_id bigint,
|
||||
event_type int,
|
||||
event_uid varchar(50),
|
||||
event_payload varchar(1000),
|
||||
event_time datetime,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE iot_device_event_log IS '设备事件日志';
|
||||
COMMENT ON COLUMN iot_device_event_log.id IS 'id';
|
||||
COMMENT ON COLUMN iot_device_event_log.device_id IS '设备id';
|
||||
COMMENT ON COLUMN iot_device_event_log.event_type IS '事件类型';
|
||||
COMMENT ON COLUMN iot_device_event_log.event_uid IS '事件标识id';
|
||||
COMMENT ON COLUMN iot_device_event_log.event_payload IS '事件数据';
|
||||
COMMENT ON COLUMN iot_device_event_log.event_time IS '事件时间';
|
||||
COMMENT ON COLUMN iot_device_event_log.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN iot_device_event_log.version IS '版本号';
|
||||
COMMENT ON COLUMN iot_device_event_log.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN iot_device_event_log.creator IS '创建者';
|
||||
COMMENT ON COLUMN iot_device_event_log.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN iot_device_event_log.updater IS '更新者';
|
||||
COMMENT ON COLUMN iot_device_event_log.update_time IS '更新时间';
|
||||
|
||||
|
||||
CREATE TABLE iot_device_service_log (
|
||||
id bigint IDENTITY NOT NULL,
|
||||
device_id bigint,
|
||||
service_type int,
|
||||
service_uid varchar(50),
|
||||
service_payload varchar(1000),
|
||||
service_time datetime,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE iot_device_service_log IS '设备服务日志';
|
||||
COMMENT ON COLUMN iot_device_service_log.id IS 'id';
|
||||
COMMENT ON COLUMN iot_device_service_log.device_id IS '设备id';
|
||||
COMMENT ON COLUMN iot_device_service_log.service_type IS '服务类型';
|
||||
COMMENT ON COLUMN iot_device_service_log.service_uid IS '服务标识id';
|
||||
COMMENT ON COLUMN iot_device_service_log.service_payload IS '服务数据';
|
||||
COMMENT ON COLUMN iot_device_service_log.service_time IS '服务时间';
|
||||
COMMENT ON COLUMN iot_device_service_log.tenant_id IS '租户ID';
|
||||
COMMENT ON COLUMN iot_device_service_log.version IS '版本号';
|
||||
COMMENT ON COLUMN iot_device_service_log.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN iot_device_service_log.creator IS '创建者';
|
||||
COMMENT ON COLUMN iot_device_service_log.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN iot_device_service_log.updater IS '更新者';
|
||||
|
||||
SET IDENTITY_INSERT iot_device ON;
|
||||
INSERT INTO iot_device (id, code, name, type, uid, secret, app_version, battery_percent, temperature, status, running_status, protocol_type, up_time, down_time, tenant_id, creator, create_time, updater, update_time, version, deleted) VALUES (1, 'test-tcp', 'testTCP', 1, 'test12345678', '123456', NULL, NULL, NULL, 1, 1, 'TCP', now(), NULL, NULL, 10000, now(), 10000, now(), 0, 0);
|
||||
|
||||
SET IDENTITY_INSERT sys_menu ON;
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1601, NULL, '物联网平台', NULL, NULL, 0, 0, 'icon-printer-fill', 6, 0, 0, 10000,now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1602, 1601, '设备列表', 'iot/device/index', NULL, 0, 0, 'icon-menu', 0, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1603, 1602, '查看', '', 'iot:device:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1604, 1602, '新增', '', 'iot:device:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1605, 1602, '修改', '', 'iot:device:update,iot:device:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1606, 1602, '删除', '', 'iot:device:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1607, 1602, '下发指令', '', 'iot:device:send', 1, 0, '', 4, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1608, 1602, '上报数据', '', 'iot:device:report', 1, 0, '', 5, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1609, 1602, '设备事件日志', '', 'iot:device_event_log:page', 1, 0, '', 5, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1610, 1602, '设备服务日志', '', 'iot:device_service_log:page', 1, 0, '', 5, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
SET IDENTITY_INSERT sys_dict_type ON;
|
||||
INSERT INTO sys_dict_type (id, dict_type,dict_name,remark,sort,tenant_id,version,deleted,creator,create_time,updater,update_time )VALUE(1601, 'device_type', '设备类型', '设备类型', 0, 10000, 0, 0, 10000, now(), 10000, now() );
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1601, '手持设备', '1', 'primary', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1601, '柜体', '2', 'primary', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1601, '传感设备', '3', 'primary', '', 2, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
INSERT INTO sys_dict_type (id, dict_type,dict_name,remark,sort,tenant_id,version,deleted,creator,create_time,updater,update_time )VALUES(1602, 'device_running_status', '设备运行状态', '设备运行状态:离线|在线|待机|使用中|OTA升级中', 0, 10000, 0, 0, 10000, now(), 10000, now() );
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1602, '离线状态', '0', 'danger', NULL, 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1602, '在线状态', '1', 'success', NULL, 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
INSERT INTO sys_dict_type (id, dict_type,dict_name,remark,sort,tenant_id,version,deleted,creator,create_time,updater,update_time )VALUES(1603, 'device_command', '设备指令', '设备服务具备的功能', 0, 10000, 0, 0, 10000, now(), 10000, now() );
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1603, '远程锁定', 'LOCK', NULL, NULL, 0, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1603, '远程解锁', 'UNLOCK', NULL, NULL, 1, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1603, '登录', 'SIGN_ON', NULL, NULL, 2, NULL, 0, 1, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1603, '登出', 'SIGN_OFF', NULL, NULL, 3, NULL, 0, 1, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1603, 'OTA升级', 'OTA_UPGRADE', NULL, NULL, 4, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
INSERT INTO sys_dict_type (id, dict_type,dict_name,remark,sort,tenant_id,version,deleted,creator,create_time,updater,update_time )VALUES(1604, 'device_property', '设备属性', '设备通用属性:运行状态|APP版本|电池电量百分比|温度', 0, 10000, 0, 0, 10000, now(), 10000, now() );
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1604, '运行状态', 'RUNNING_STATUS', NULL, NULL, 0, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1604, 'APP版本', 'APP_VERSION', NULL, NULL, 1, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1604, '电池电量百分比', 'BATTERY_PERCENT', NULL, NULL, 2, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1604, '温度', 'TEMPERATURE', NULL, NULL, 3, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
INSERT INTO sys_dict_type (id, dict_type,dict_name,remark,sort,tenant_id,version,deleted,creator,create_time,updater,update_time )VALUES(1605, 'device_event_type', '事件类型', '事件日志类型', 0, 10000, 0, 0, 10000, now(), 10000, now() );
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1605, '下线', 'OFFLINE', 'danger', NULL, 1, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1605, '上线', 'ONLINE', 'primary', NULL, 2, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1605, '登录', 'SIGN_ON', 'primary', NULL, 3, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1605, '退出登录', 'SIGN_OFF', 'danger', NULL, 4, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1605, 'OTA升级', 'OTA_UPGRADE', 'primary', NULL, 5, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1605, '设备远程锁定', 'LOCK', 'primary', NULL, 6, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1605, '设备远程解锁', 'UNLOCK', 'primary', NULL,7, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1605, 'APP版本信息', 'APP_VERSION_REPORT', 'primary', NULL, 8, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1605, '电池电量', 'BATTERY_PERCENT_REPORT', 'primary', NULL, 9, NULL, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1605, '温度', 'TEMPERATURE_REPORT', 'primary', NULL, 0, NULL, 10, 0, 10000, now(), 10000, now());
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
CREATE TABLE member_user
|
||||
(
|
||||
id bigint IDENTITY NOT NULL,
|
||||
nick_name varchar(100) NOT NULL,
|
||||
mobile varchar(20) NOT NULL,
|
||||
avatar varchar(200),
|
||||
birthday date,
|
||||
gender int,
|
||||
openid varchar(200),
|
||||
last_login_ip varchar(100),
|
||||
last_login_time datetime,
|
||||
remark varchar(500),
|
||||
status int,
|
||||
tenant_id bigint,
|
||||
version int,
|
||||
deleted int,
|
||||
create_time datetime,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE member_user IS '会员管理';
|
||||
COMMENT ON COLUMN member_user.id IS 'id';
|
||||
COMMENT ON COLUMN member_user.nick_name IS '昵称';
|
||||
COMMENT ON COLUMN member_user.mobile IS '手机号';
|
||||
COMMENT ON COLUMN member_user.avatar IS '头像';
|
||||
COMMENT ON COLUMN member_user.birthday IS '出生日期';
|
||||
COMMENT ON COLUMN member_user.gender IS '性别 0:男 1:女 2:未知';
|
||||
COMMENT ON COLUMN member_user.openid IS '第三方平台,唯一标识';
|
||||
COMMENT ON COLUMN member_user.last_login_ip IS '最后登录IP';
|
||||
COMMENT ON COLUMN member_user.last_login_time IS '最后登录时间';
|
||||
COMMENT ON COLUMN member_user.remark IS '备注';
|
||||
COMMENT ON COLUMN member_user.status IS '状态 0:禁用 1:启用';
|
||||
COMMENT ON COLUMN member_user.version IS '版本号';
|
||||
COMMENT ON COLUMN member_user.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN member_user.create_time IS '创建时间';
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
SET IDENTITY_INSERT sys_menu ON;
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1301, 33, '系统监控', '', '', 0, 0, 'icon-Report', 10, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1302, 1301, '服务监控', 'monitor/server/index', 'monitor:server:all', 0, 0, 'icon-sever', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1304, 1301, '缓存监控', 'monitor/cache/index', 'monitor:cache:all', 0, 0, 'icon-fund-fill', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1305, 1301, '在线用户', 'monitor/user/index', 'monitor:user:all', 0, 0, 'icon-user', 3, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
commit;
|
||||
|
|
@ -1,245 +0,0 @@
|
|||
SET IDENTITY_INSERT sys_menu ON;
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1201, 1, '定时任务', 'quartz/schedule/index', NULL, 0, 0, 'icon-reloadtime', 0, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1202, 1201, '查看', '', 'schedule:page', 1, 0, '', 0, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1203, 1201, '新增', '', 'schedule:save', 1, 0, '', 1, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1204, 1201, '修改', '', 'schedule:update,schedule:info', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1205, 1201, '删除', '', 'schedule:delete', 1, 0, '', 3, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1206, 1201, '立即运行', '', 'schedule:run', 1, 0, '', 2, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_menu (id, pid, name, url, authority, type, open_style, icon, sort, version, deleted, creator, create_time, updater, update_time) VALUES (1207, 1201, '日志', '', 'schedule:log', 1, 0, '', 4, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
SET IDENTITY_INSERT sys_dict_type ON;
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1201, 'schedule_group', '任务组名', '定时任务', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1201, '默认', 'default', '', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1201, '系统', 'system', '', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
INSERT INTO sys_dict_type (id, dict_type, dict_name, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1202, 'schedule_status', '状态', '定时任务', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1202, '暂停', '0', 'danger', '', 0, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
INSERT INTO sys_dict_data (dict_type_id, dict_label, dict_value, label_class, remark, sort, tenant_id, version, deleted, creator, create_time, updater, update_time) VALUES (1202, '正常', '1', 'primary', '', 1, 10000, 0, 0, 10000, now(), 10000, now());
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS schedule_job;
|
||||
DROP TABLE IF EXISTS schedule_job_log;
|
||||
|
||||
CREATE TABLE schedule_job (
|
||||
id bigint IDENTITY NOT NULL,
|
||||
job_name varchar(200),
|
||||
job_group varchar(100),
|
||||
bean_name varchar(200),
|
||||
method varchar(100),
|
||||
params varchar(2000),
|
||||
cron_expression varchar(100),
|
||||
status int,
|
||||
concurrent int,
|
||||
remark varchar(255),
|
||||
version int,
|
||||
deleted int,
|
||||
creator bigint,
|
||||
create_time datetime,
|
||||
updater bigint,
|
||||
update_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
COMMENT ON TABLE schedule_job IS '定时任务';
|
||||
COMMENT ON COLUMN schedule_job.id IS 'id';
|
||||
COMMENT ON COLUMN schedule_job.job_name IS '名称';
|
||||
COMMENT ON COLUMN schedule_job.job_group IS '分组';
|
||||
COMMENT ON COLUMN schedule_job.bean_name IS 'spring bean名称';
|
||||
COMMENT ON COLUMN schedule_job.method IS '执行方法';
|
||||
COMMENT ON COLUMN schedule_job.params IS '参数';
|
||||
COMMENT ON COLUMN schedule_job.cron_expression IS 'cron表达式';
|
||||
COMMENT ON COLUMN schedule_job.status IS '状态 0:暂停 1:正常';
|
||||
COMMENT ON COLUMN schedule_job.concurrent IS '是否并发 0:禁止 1:允许';
|
||||
COMMENT ON COLUMN schedule_job.remark IS '备注';
|
||||
COMMENT ON COLUMN schedule_job.version IS '版本号';
|
||||
COMMENT ON COLUMN schedule_job.deleted IS '删除标识 0:正常 1:已删除';
|
||||
COMMENT ON COLUMN schedule_job.creator IS '创建者';
|
||||
COMMENT ON COLUMN schedule_job.create_time IS '创建时间';
|
||||
COMMENT ON COLUMN schedule_job.updater IS '更新者';
|
||||
COMMENT ON COLUMN schedule_job.update_time IS '更新时间';
|
||||
|
||||
|
||||
CREATE TABLE schedule_job_log (
|
||||
id bigint IDENTITY NOT NULL,
|
||||
job_id bigint NOT NULL,
|
||||
job_name varchar(200),
|
||||
job_group varchar(100),
|
||||
bean_name varchar(200),
|
||||
method varchar(100),
|
||||
params varchar(2000),
|
||||
status int,
|
||||
error varchar(2000),
|
||||
times bigint NOT NULL,
|
||||
create_time datetime,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
COMMENT ON TABLE schedule_job_log IS '定时任务日志';
|
||||
COMMENT ON COLUMN schedule_job_log.id IS 'id';
|
||||
COMMENT ON COLUMN schedule_job_log.job_id IS '任务id';
|
||||
COMMENT ON COLUMN schedule_job_log.job_name IS '任务名称';
|
||||
COMMENT ON COLUMN schedule_job_log.job_group IS '任务组名';
|
||||
COMMENT ON COLUMN schedule_job_log.bean_name IS 'spring bean名称';
|
||||
COMMENT ON COLUMN schedule_job_log.method IS '执行方法';
|
||||
COMMENT ON COLUMN schedule_job_log.params IS '参数';
|
||||
COMMENT ON COLUMN schedule_job_log.status IS '任务状态 0:失败 1:成功';
|
||||
COMMENT ON COLUMN schedule_job_log.error IS '异常信息';
|
||||
COMMENT ON COLUMN schedule_job_log.times IS '耗时(单位:毫秒)';
|
||||
COMMENT ON COLUMN schedule_job_log.create_time IS '创建时间';
|
||||
|
||||
|
||||
INSERT INTO schedule_job (job_name, job_group, bean_name, method, params, cron_expression, status, concurrent, remark, version, deleted, creator, create_time, updater, update_time) VALUES ('测试任务', 'system', 'testTask', 'run', '123', '0 * * * * ? *', 0, 0, '', 14, 0, 10000, now(), 10000, now());
|
||||
|
||||
|
||||
|
||||
|
||||
-- ----------------------------------------------------------
|
||||
-- 以下为Quartz框架,自带的表结构
|
||||
-- ----------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
|
||||
DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
|
||||
DROP TABLE IF EXISTS QRTZ_LOCKS;
|
||||
DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_TRIGGERS;
|
||||
DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
|
||||
DROP TABLE IF EXISTS QRTZ_CALENDARS;
|
||||
|
||||
create table QRTZ_JOB_DETAILS (
|
||||
sched_name varchar(120) not null,
|
||||
job_name varchar(200) not null,
|
||||
job_group varchar(200) not null,
|
||||
description varchar(250) null,
|
||||
job_class_name varchar(250) not null,
|
||||
is_durable varchar(1) not null,
|
||||
is_nonconcurrent varchar(1) not null,
|
||||
is_update_data varchar(1) not null,
|
||||
requests_recovery varchar(1) not null,
|
||||
job_data blob null,
|
||||
primary key (sched_name, job_name, job_group)
|
||||
);
|
||||
|
||||
create table QRTZ_TRIGGERS (
|
||||
sched_name varchar(120) not null,
|
||||
trigger_name varchar(200) not null,
|
||||
trigger_group varchar(200) not null,
|
||||
job_name varchar(200) not null,
|
||||
job_group varchar(200) not null,
|
||||
description varchar(250) null,
|
||||
next_fire_time bigint null,
|
||||
prev_fire_time bigint null,
|
||||
priority int null,
|
||||
trigger_state varchar(16) not null,
|
||||
trigger_type varchar(8) not null,
|
||||
start_time bigint not null,
|
||||
end_time bigint null,
|
||||
calendar_name varchar(200) null,
|
||||
misfire_instr int null,
|
||||
job_data blob null,
|
||||
primary key (sched_name, trigger_name, trigger_group),
|
||||
foreign key (sched_name, job_name, job_group)
|
||||
references QRTZ_JOB_DETAILS(sched_name, job_name, job_group)
|
||||
);
|
||||
|
||||
create table QRTZ_SIMPLE_TRIGGERS (
|
||||
sched_name varchar(120) not null,
|
||||
trigger_name varchar(200) not null,
|
||||
trigger_group varchar(200) not null,
|
||||
repeat_count bigint not null,
|
||||
repeat_interval bigint not null,
|
||||
times_triggered bigint not null,
|
||||
primary key (sched_name, trigger_name, trigger_group),
|
||||
foreign key (sched_name, trigger_name, trigger_group)
|
||||
references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
|
||||
);
|
||||
|
||||
create table QRTZ_CRON_TRIGGERS (
|
||||
sched_name varchar(120) not null,
|
||||
trigger_name varchar(200) not null,
|
||||
trigger_group varchar(200) not null,
|
||||
cron_expression varchar(200) not null,
|
||||
time_zone_id varchar(80),
|
||||
primary key (sched_name, trigger_name, trigger_group),
|
||||
foreign key (sched_name, trigger_name, trigger_group)
|
||||
references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
|
||||
);
|
||||
|
||||
create table QRTZ_BLOB_TRIGGERS (
|
||||
sched_name varchar(120) not null,
|
||||
trigger_name varchar(200) not null,
|
||||
trigger_group varchar(200) not null,
|
||||
blob_data blob null,
|
||||
primary key (sched_name, trigger_name, trigger_group),
|
||||
foreign key (sched_name, trigger_name, trigger_group)
|
||||
references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
|
||||
);
|
||||
|
||||
create table QRTZ_CALENDARS (
|
||||
sched_name varchar(120) not null,
|
||||
calendar_name varchar(200) not null,
|
||||
calendar blob not null,
|
||||
primary key (sched_name, calendar_name)
|
||||
);
|
||||
|
||||
create table QRTZ_PAUSED_TRIGGER_GRPS (
|
||||
sched_name varchar(120) not null,
|
||||
trigger_group varchar(200) not null,
|
||||
primary key (sched_name, trigger_group)
|
||||
);
|
||||
|
||||
create table QRTZ_FIRED_TRIGGERS (
|
||||
sched_name varchar(120) not null,
|
||||
entry_id varchar(95) not null,
|
||||
trigger_name varchar(200) not null,
|
||||
trigger_group varchar(200) not null,
|
||||
instance_name varchar(200) not null,
|
||||
fired_time bigint not null,
|
||||
sched_time bigint not null,
|
||||
priority int not null,
|
||||
state varchar(16) not null,
|
||||
job_name varchar(200) null,
|
||||
job_group varchar(200) null,
|
||||
is_nonconcurrent varchar(1) null,
|
||||
requests_recovery varchar(1) null,
|
||||
primary key (sched_name, entry_id)
|
||||
);
|
||||
|
||||
create table QRTZ_SCHEDULER_STATE (
|
||||
sched_name varchar(120) not null,
|
||||
instance_name varchar(200) not null,
|
||||
last_checkin_time bigint not null,
|
||||
checkin_interval bigint not null,
|
||||
primary key (sched_name, instance_name)
|
||||
);
|
||||
|
||||
create table QRTZ_LOCKS (
|
||||
sched_name varchar(120) not null,
|
||||
lock_name varchar(40) not null,
|
||||
primary key (sched_name, lock_name)
|
||||
);
|
||||
|
||||
create table QRTZ_SIMPROP_TRIGGERS (
|
||||
sched_name varchar(120) not null,
|
||||
trigger_name varchar(200) not null,
|
||||
trigger_group varchar(200) not null,
|
||||
str_prop_1 varchar(512) null,
|
||||
str_prop_2 varchar(512) null,
|
||||
str_prop_3 varchar(512) null,
|
||||
int_prop_1 int null,
|
||||
int_prop_2 int null,
|
||||
long_prop_1 bigint null,
|
||||
long_prop_2 bigint null,
|
||||
dec_prop_1 numeric(13,4) null,
|
||||
dec_prop_2 numeric(13,4) null,
|
||||
bool_prop_1 varchar(1) null,
|
||||
bool_prop_2 varchar(1) null,
|
||||
primary key (sched_name, trigger_name, trigger_group),
|
||||
foreign key (sched_name, trigger_name, trigger_group)
|
||||
references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
|
||||
);
|
||||
Loading…
Reference in New Issue
Block a user