Bonus-Cloud/sql/bns_202412_patch.sql

83 lines
4.0 KiB
MySQL
Raw Normal View History

2024-12-31 10:33:12 +08:00
SET NAMES utf8mb4;
2025-01-05 20:22:10 +08:00
-- 菜单模版ID
2025-01-05 09:26:54 +08:00
alter table sys_dept add menu_template_id bigint(20) null comment '菜单模版ID';
2025-01-05 20:22:10 +08:00
-- 公司管理员用户ID
alter table sys_dept add admin_user_id bigint(20) null comment '公司管理员用户ID';
-- 公司用户初始密码
alter table sys_dept add init_password varchar(255) null comment '公司用户初始密码';
2024-12-31 10:33:12 +08:00
-- 省
alter table sys_dept add province varchar(50) null comment '';
-- 市
alter table sys_dept add city varchar(50) null comment '';
-- 县
alter table sys_dept add district varchar(50) null comment '';
-- 详细地址
alter table sys_dept add address varchar(255) null comment '详细地址';
-- 公司简称
alter table sys_dept add dept_abbreviation varchar(255) null comment '公司简称';
-- 公司概述
alter table sys_dept add remark varchar(255) null comment '公司概述';
-- 公司logo
2025-01-05 09:26:54 +08:00
alter table sys_dept add logo varchar(255) null comment '公司logo';
2025-01-05 20:22:10 +08:00
2025-01-05 11:12:45 +08:00
-- 所属公司ID
alter table sys_role add company_id bigint null comment '所属公司ID';
2025-01-05 20:22:10 +08:00
-- 所属公司ID
alter table sys_post
add company_id bigint null comment '所属公司ID';
2025-01-05 11:12:45 +08:00
-- 系统模板表
create table sys_template
(
id bigint auto_increment
primary key,
name varchar(50) not null comment '模板名称',
remark varchar(200) null comment '备注'
)
comment '权限模板表' charset = utf8
row_format = DYNAMIC;
-- 插入菜单默认模板
INSERT INTO sys_template (id, name, remark) VALUES (1, 'default_menu_template', '默认公司菜单模板');
-- 系统模板菜单表
create table sys_template_menu
(
temp_id bigint not null comment '模板ID',
menu_id bigint not null comment '菜单ID'
)
comment '系统模板菜单表' charset = utf8
row_format = DYNAMIC;
-- 插入菜单模板数据
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 100);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 101);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 103);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1007);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1008);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1009);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1010);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1011);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1016);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1017);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1018);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1019);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1000);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1001);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1002);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1003);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1004);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1005);
2025-01-05 20:22:10 +08:00
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1006);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 104);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1020);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1021);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1022);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1023);
INSERT INTO bns_cloud_smart_site.sys_template_menu (temp_id, menu_id) VALUES (1, 1024);