mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-21 02:25:56 +08:00
add 新增 sql 脚本增加租户id
This commit is contained in:
parent
40d516b27f
commit
cf08622fc8
@ -90,6 +90,7 @@ comment on column sys_tenant_package.update_time is '更新时间';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
create table sys_dept (
|
create table sys_dept (
|
||||||
dept_id number(20) not null,
|
dept_id number(20) not null,
|
||||||
|
tenant_id varchar2(20) not null,
|
||||||
parent_id number(20) default 0,
|
parent_id number(20) default 0,
|
||||||
ancestors varchar2(500) default '',
|
ancestors varchar2(500) default '',
|
||||||
dept_name varchar2(30) default '',
|
dept_name varchar2(30) default '',
|
||||||
@ -110,6 +111,7 @@ alter table sys_dept add constraint pk_sys_dept primary key (dept_id);
|
|||||||
|
|
||||||
comment on table sys_dept is '部门表';
|
comment on table sys_dept is '部门表';
|
||||||
comment on column sys_dept.dept_id is '部门id';
|
comment on column sys_dept.dept_id is '部门id';
|
||||||
|
comment on column sys_dept.tenant_id is '租户编号';
|
||||||
comment on column sys_dept.parent_id is '父部门id';
|
comment on column sys_dept.parent_id is '父部门id';
|
||||||
comment on column sys_dept.ancestors is '祖级列表';
|
comment on column sys_dept.ancestors is '祖级列表';
|
||||||
comment on column sys_dept.dept_name is '部门名称';
|
comment on column sys_dept.dept_name is '部门名称';
|
||||||
@ -128,16 +130,16 @@ comment on column sys_dept.update_time is '更新时间';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-部门表数据
|
-- 初始化-部门表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_dept values(100, 0, '0', 'XXX科技', 0, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
insert into sys_dept values(100, '000000', 0, '0', 'XXX科技', 0, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
||||||
insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
insert into sys_dept values(101, '000000', 100, '0,100', '深圳总公司', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
||||||
insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
insert into sys_dept values(102, '000000', 100, '0,100', '长沙分公司', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
||||||
insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
insert into sys_dept values(103, '000000', 101, '0,100,101', '研发部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
||||||
insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
insert into sys_dept values(104, '000000', 101, '0,100,101', '市场部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
||||||
insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
insert into sys_dept values(105, '000000', 101, '0,100,101', '测试部门', 3, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
||||||
insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
insert into sys_dept values(106, '000000', 101, '0,100,101', '财务部门', 4, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
||||||
insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
insert into sys_dept values(107, '000000', 101, '0,100,101', '运维部门', 5, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
||||||
insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
insert into sys_dept values(108, '000000', 102, '0,100,102', '市场部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
||||||
insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
insert into sys_dept values(109, '000000', 102, '0,100,102', '财务部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null);
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -145,6 +147,7 @@ insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '疯
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
create table sys_user (
|
create table sys_user (
|
||||||
user_id number(20) not null,
|
user_id number(20) not null,
|
||||||
|
tenant_id varchar2(20) not null,
|
||||||
dept_id number(20) default null,
|
dept_id number(20) default null,
|
||||||
user_name varchar2(40) not null,
|
user_name varchar2(40) not null,
|
||||||
nick_name varchar2(40) not null,
|
nick_name varchar2(40) not null,
|
||||||
@ -170,6 +173,7 @@ alter table sys_user add constraint pk_sys_user primary key (user_id);
|
|||||||
|
|
||||||
comment on table sys_user is '用户信息表';
|
comment on table sys_user is '用户信息表';
|
||||||
comment on column sys_user.user_id is '用户ID';
|
comment on column sys_user.user_id is '用户ID';
|
||||||
|
comment on column sys_user.tenant_id is '租户编号';
|
||||||
comment on column sys_user.dept_id is '部门ID';
|
comment on column sys_user.dept_id is '部门ID';
|
||||||
comment on column sys_user.user_name is '用户账号';
|
comment on column sys_user.user_name is '用户账号';
|
||||||
comment on column sys_user.nick_name is '用户昵称';
|
comment on column sys_user.nick_name is '用户昵称';
|
||||||
@ -193,8 +197,8 @@ comment on column sys_user.remark is '备注';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-用户信息表数据
|
-- 初始化-用户信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_user values(1, 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '管理员');
|
insert into sys_user values(1, '000000', 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '管理员');
|
||||||
insert into sys_user values(2, 105, 'lionli', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '测试员');
|
insert into sys_user values(2, '000000', 105, 'lionli', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '测试员');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -202,6 +206,7 @@ insert into sys_user values(2, 105, 'lionli', '疯狂的狮子Li', 'sys_user',
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
create table sys_post (
|
create table sys_post (
|
||||||
post_id number(20) not null,
|
post_id number(20) not null,
|
||||||
|
tenant_id varchar2(20) not null,
|
||||||
post_code varchar2(64) not null,
|
post_code varchar2(64) not null,
|
||||||
post_name varchar2(50) not null,
|
post_name varchar2(50) not null,
|
||||||
post_sort number(4) not null,
|
post_sort number(4) not null,
|
||||||
@ -218,6 +223,7 @@ alter table sys_post add constraint pk_sys_post primary key (post_id);
|
|||||||
|
|
||||||
comment on table sys_post is '岗位信息表';
|
comment on table sys_post is '岗位信息表';
|
||||||
comment on column sys_post.post_id is '岗位ID';
|
comment on column sys_post.post_id is '岗位ID';
|
||||||
|
comment on column sys_post.tenant_id is '租户编号';
|
||||||
comment on column sys_post.post_code is '岗位编码';
|
comment on column sys_post.post_code is '岗位编码';
|
||||||
comment on column sys_post.post_name is '岗位名称';
|
comment on column sys_post.post_name is '岗位名称';
|
||||||
comment on column sys_post.post_sort is '显示顺序';
|
comment on column sys_post.post_sort is '显示顺序';
|
||||||
@ -232,10 +238,10 @@ comment on column sys_post.remark is '备注';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-岗位信息表数据
|
-- 初始化-岗位信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_post values(1, 'ceo', '董事长', 1, '0', 103, 1, sysdate, null, null, '');
|
insert into sys_post values(1, '000000', 'ceo', '董事长', 1, '0', 103, 1, sysdate, null, null, '');
|
||||||
insert into sys_post values(2, 'se', '项目经理', 2, '0', 103, 1, sysdate, null, null, '');
|
insert into sys_post values(2, '000000', 'se', '项目经理', 2, '0', 103, 1, sysdate, null, null, '');
|
||||||
insert into sys_post values(3, 'hr', '人力资源', 3, '0', 103, 1, sysdate, null, null, '');
|
insert into sys_post values(3, '000000', 'hr', '人力资源', 3, '0', 103, 1, sysdate, null, null, '');
|
||||||
insert into sys_post values(4, 'user', '普通员工', 4, '0', 103, 1, sysdate, null, null, '');
|
insert into sys_post values(4, '000000', 'user', '普通员工', 4, '0', 103, 1, sysdate, null, null, '');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -243,6 +249,7 @@ insert into sys_post values(4, 'user', '普通员工', 4, '0', 103, 1, sysdate,
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
create table sys_role (
|
create table sys_role (
|
||||||
role_id number(20) not null,
|
role_id number(20) not null,
|
||||||
|
tenant_id varchar2(20) not null,
|
||||||
role_name varchar2(30) not null,
|
role_name varchar2(30) not null,
|
||||||
role_key varchar2(100) not null,
|
role_key varchar2(100) not null,
|
||||||
role_sort number(4) not null,
|
role_sort number(4) not null,
|
||||||
@ -263,6 +270,7 @@ alter table sys_role add constraint pk_sys_role primary key (role_id);
|
|||||||
|
|
||||||
comment on table sys_role is '角色信息表';
|
comment on table sys_role is '角色信息表';
|
||||||
comment on column sys_role.role_id is '角色ID';
|
comment on column sys_role.role_id is '角色ID';
|
||||||
|
comment on column sys_role.tenant_id is '租户编号';
|
||||||
comment on column sys_role.role_name is '角色名称';
|
comment on column sys_role.role_name is '角色名称';
|
||||||
comment on column sys_role.role_key is '角色权限字符串';
|
comment on column sys_role.role_key is '角色权限字符串';
|
||||||
comment on column sys_role.role_sort is '显示顺序';
|
comment on column sys_role.role_sort is '显示顺序';
|
||||||
@ -281,8 +289,8 @@ comment on column sys_role.remark is '备注';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-角色信息表数据
|
-- 初始化-角色信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_role values('1', '超级管理员', 'admin', 1, 1, 1, 1, '0', '0', 103, 1, sysdate, null, null, '超级管理员');
|
insert into sys_role values('1', '000000', '超级管理员', 'admin', 1, 1, 1, 1, '0', '0', 103, 1, sysdate, null, null, '超级管理员');
|
||||||
insert into sys_role values('2', '普通角色', 'common', 2, 2, 1, 1, '0', '0', 103, 1, sysdate, null, null, '普通角色');
|
insert into sys_role values('2', '000000', '普通角色', 'common', 2, 2, 1, 1, '0', '0', 103, 1, sysdate, null, null, '普通角色');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -609,7 +617,8 @@ insert into sys_user_post values ('2', '2');
|
|||||||
-- 10、操作日志记录
|
-- 10、操作日志记录
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
create table sys_oper_log (
|
create table sys_oper_log (
|
||||||
oper_id number(20) not null ,
|
oper_id number(20) not null,
|
||||||
|
tenant_id varchar2(20) not null,
|
||||||
title varchar2(50) default '',
|
title varchar2(50) default '',
|
||||||
business_type number(2) default 0,
|
business_type number(2) default 0,
|
||||||
method varchar2(100) default '',
|
method varchar2(100) default '',
|
||||||
@ -623,7 +632,7 @@ create table sys_oper_log (
|
|||||||
oper_param varchar2(2100) default '',
|
oper_param varchar2(2100) default '',
|
||||||
json_result varchar2(2100) default '',
|
json_result varchar2(2100) default '',
|
||||||
status number(1) default 0,
|
status number(1) default 0,
|
||||||
error_msg varchar2(2100) default '' ,
|
error_msg varchar2(2100) default '',
|
||||||
oper_time date
|
oper_time date
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -631,6 +640,7 @@ alter table sys_oper_log add constraint pk_sys_oper_log primary key (oper_id);
|
|||||||
|
|
||||||
comment on table sys_oper_log is '操作日志记录';
|
comment on table sys_oper_log is '操作日志记录';
|
||||||
comment on column sys_oper_log.oper_id is '日志主键';
|
comment on column sys_oper_log.oper_id is '日志主键';
|
||||||
|
comment on column sys_oper_log.tenant_id is '租户编号';
|
||||||
comment on column sys_oper_log.title is '模块标题';
|
comment on column sys_oper_log.title is '模块标题';
|
||||||
comment on column sys_oper_log.business_type is '业务类型(0其它 1新增 2修改 3删除)';
|
comment on column sys_oper_log.business_type is '业务类型(0其它 1新增 2修改 3删除)';
|
||||||
comment on column sys_oper_log.method is '方法名称';
|
comment on column sys_oper_log.method is '方法名称';
|
||||||
@ -800,6 +810,7 @@ insert into sys_config values(11, 'OSS预览列表资源开关', 'sys.o
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
create table sys_logininfor (
|
create table sys_logininfor (
|
||||||
info_id number(20) not null,
|
info_id number(20) not null,
|
||||||
|
tenant_id varchar2(20) not null,
|
||||||
user_name varchar2(50) default '',
|
user_name varchar2(50) default '',
|
||||||
ipaddr varchar2(128) default '',
|
ipaddr varchar2(128) default '',
|
||||||
login_location varchar2(255) default '',
|
login_location varchar2(255) default '',
|
||||||
@ -814,6 +825,7 @@ alter table sys_logininfor add constraint pk_sys_logininfor primary key (info_id
|
|||||||
|
|
||||||
comment on table sys_logininfor is '系统访问记录';
|
comment on table sys_logininfor is '系统访问记录';
|
||||||
comment on column sys_logininfor.info_id is '访问ID';
|
comment on column sys_logininfor.info_id is '访问ID';
|
||||||
|
comment on column sys_logininfor.tenant_id is '租户编号';
|
||||||
comment on column sys_logininfor.user_name is '登录账号';
|
comment on column sys_logininfor.user_name is '登录账号';
|
||||||
comment on column sys_logininfor.ipaddr is '登录IP地址';
|
comment on column sys_logininfor.ipaddr is '登录IP地址';
|
||||||
comment on column sys_logininfor.login_location is '登录地点';
|
comment on column sys_logininfor.login_location is '登录地点';
|
||||||
@ -829,6 +841,7 @@ comment on column sys_logininfor.login_time is '访问时间';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
create table sys_notice (
|
create table sys_notice (
|
||||||
notice_id number(20) not null,
|
notice_id number(20) not null,
|
||||||
|
tenant_id varchar2(20) not null,
|
||||||
notice_title varchar2(50) not null,
|
notice_title varchar2(50) not null,
|
||||||
notice_type char(1) not null,
|
notice_type char(1) not null,
|
||||||
notice_content clob default null,
|
notice_content clob default null,
|
||||||
@ -845,6 +858,7 @@ alter table sys_notice add constraint pk_sys_notice primary key (notice_id);
|
|||||||
|
|
||||||
comment on table sys_notice is '通知公告表';
|
comment on table sys_notice is '通知公告表';
|
||||||
comment on column sys_notice.notice_id is '公告主键';
|
comment on column sys_notice.notice_id is '公告主键';
|
||||||
|
comment on column sys_notice.tenant_id is '租户编号';
|
||||||
comment on column sys_notice.notice_title is '公告标题';
|
comment on column sys_notice.notice_title is '公告标题';
|
||||||
comment on column sys_notice.notice_type is '公告类型(1通知 2公告)';
|
comment on column sys_notice.notice_type is '公告类型(1通知 2公告)';
|
||||||
comment on column sys_notice.notice_content is '公告内容';
|
comment on column sys_notice.notice_content is '公告内容';
|
||||||
@ -859,8 +873,8 @@ comment on column sys_notice.remark is '备注';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-公告信息表数据
|
-- 初始化-公告信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_notice values('1', '温馨提醒:2018-07-01 新版本发布啦', '2', '新版本内容', '0', 103, 1, sysdate, null, null, '管理员');
|
insert into sys_notice values('1', '000000', '温馨提醒:2018-07-01 新版本发布啦', '2', '新版本内容', '0', 103, 1, sysdate, null, null, '管理员');
|
||||||
insert into sys_notice values('2', '维护通知:2018-07-01 系统凌晨维护', '1', '维护内容', '0', 103, 1, sysdate, null, null, '管理员');
|
insert into sys_notice values('2', '000000', '维护通知:2018-07-01 系统凌晨维护', '1', '维护内容', '0', 103, 1, sysdate, null, null, '管理员');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -978,6 +992,7 @@ comment on column gen_table_column.update_time is '更新时间';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
create table sys_oss (
|
create table sys_oss (
|
||||||
oss_id number(20) not null,
|
oss_id number(20) not null,
|
||||||
|
tenant_id varchar2(20) not null,
|
||||||
file_name varchar(255) not null,
|
file_name varchar(255) not null,
|
||||||
original_name varchar(255) not null,
|
original_name varchar(255) not null,
|
||||||
file_suffix varchar(10) not null,
|
file_suffix varchar(10) not null,
|
||||||
@ -994,6 +1009,7 @@ alter table sys_oss add constraint pk_sys_oss primary key (oss_id);
|
|||||||
|
|
||||||
comment on table sys_oss is 'OSS对象存储表';
|
comment on table sys_oss is 'OSS对象存储表';
|
||||||
comment on column sys_oss.oss_id is '对象存储主键';
|
comment on column sys_oss.oss_id is '对象存储主键';
|
||||||
|
comment on column sys_oss.tenant_id is '租户编码';
|
||||||
comment on column sys_oss.file_name is '文件名';
|
comment on column sys_oss.file_name is '文件名';
|
||||||
comment on column sys_oss.original_name is '原名';
|
comment on column sys_oss.original_name is '原名';
|
||||||
comment on column sys_oss.file_suffix is '文件后缀名';
|
comment on column sys_oss.file_suffix is '文件后缀名';
|
||||||
@ -1011,6 +1027,7 @@ comment on column sys_oss.update_by is '更新者';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
create table sys_oss_config (
|
create table sys_oss_config (
|
||||||
oss_config_id number(20) not null,
|
oss_config_id number(20) not null,
|
||||||
|
tenant_id varchar2(20) not null,
|
||||||
config_key varchar(20) not null,
|
config_key varchar(20) not null,
|
||||||
access_key varchar(255) default '',
|
access_key varchar(255) default '',
|
||||||
secret_key varchar(255) default '',
|
secret_key varchar(255) default '',
|
||||||
@ -1035,6 +1052,7 @@ alter table sys_oss_config add constraint pk_sys_oss_config primary key (oss_con
|
|||||||
|
|
||||||
comment on table sys_oss_config is '对象存储配置表';
|
comment on table sys_oss_config is '对象存储配置表';
|
||||||
comment on column sys_oss_config.oss_config_id is '主建';
|
comment on column sys_oss_config.oss_config_id is '主建';
|
||||||
|
comment on column sys_oss_config.tenant_id is '租户编码';
|
||||||
comment on column sys_oss_config.config_key is '配置key';
|
comment on column sys_oss_config.config_key is '配置key';
|
||||||
comment on column sys_oss_config.access_key is 'accesskey';
|
comment on column sys_oss_config.access_key is 'accesskey';
|
||||||
comment on column sys_oss_config.secret_key is '秘钥';
|
comment on column sys_oss_config.secret_key is '秘钥';
|
||||||
@ -1054,11 +1072,11 @@ comment on column sys_oss_config.create_time is '创建时间';
|
|||||||
comment on column sys_oss_config.update_by is '更新者';
|
comment on column sys_oss_config.update_by is '更新者';
|
||||||
comment on column sys_oss_config.update_time is '更新时间';
|
comment on column sys_oss_config.update_time is '更新时间';
|
||||||
|
|
||||||
insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1', '0', '', NULL, 103, 1, sysdate, 1, sysdate);
|
insert into sys_oss_config values (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1', '0', '', NULL, 103, 1, sysdate, 1, sysdate);
|
||||||
insert into sys_oss_config values (2, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
|
insert into sys_oss_config values (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
|
||||||
insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
|
insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
|
||||||
insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
|
insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
|
||||||
insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
|
insert into sys_oss_config values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate);
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|||||||
@ -97,6 +97,7 @@ drop table if exists sys_dept;
|
|||||||
create table if not exists sys_dept
|
create table if not exists sys_dept
|
||||||
(
|
(
|
||||||
dept_id int8,
|
dept_id int8,
|
||||||
|
tenant_id varchar(20) not null,
|
||||||
parent_id int8 default 0,
|
parent_id int8 default 0,
|
||||||
ancestors varchar(500)default ''::varchar,
|
ancestors varchar(500)default ''::varchar,
|
||||||
dept_name varchar(30) default ''::varchar,
|
dept_name varchar(30) default ''::varchar,
|
||||||
@ -116,6 +117,7 @@ create table if not exists sys_dept
|
|||||||
|
|
||||||
comment on table sys_dept is '部门表';
|
comment on table sys_dept is '部门表';
|
||||||
comment on column sys_dept.dept_id is '部门ID';
|
comment on column sys_dept.dept_id is '部门ID';
|
||||||
|
comment on column sys_dept.tenant_id is '租户编号';
|
||||||
comment on column sys_dept.parent_id is '父部门ID';
|
comment on column sys_dept.parent_id is '父部门ID';
|
||||||
comment on column sys_dept.ancestors is '祖级列表';
|
comment on column sys_dept.ancestors is '祖级列表';
|
||||||
comment on column sys_dept.dept_name is '部门名称';
|
comment on column sys_dept.dept_name is '部门名称';
|
||||||
@ -134,16 +136,16 @@ comment on column sys_dept.update_time is '更新时间';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-部门表数据
|
-- 初始化-部门表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_dept values(100, 0, '0', 'XXX科技', 0, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
insert into sys_dept values(100, '000000', 0, '0', 'XXX科技', 0, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
||||||
insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
insert into sys_dept values(101, '000000', 100, '0,100', '深圳总公司', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
||||||
insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
insert into sys_dept values(102, '000000', 100, '0,100', '长沙分公司', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
||||||
insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
insert into sys_dept values(103, '000000', 101, '0,100,101', '研发部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
||||||
insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
insert into sys_dept values(104, '000000', 101, '0,100,101', '市场部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
||||||
insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
insert into sys_dept values(105, '000000', 101, '0,100,101', '测试部门', 3, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
||||||
insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
insert into sys_dept values(106, '000000', 101, '0,100,101', '财务部门', 4, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
||||||
insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
insert into sys_dept values(107, '000000', 101, '0,100,101', '运维部门', 5, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
||||||
insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
insert into sys_dept values(108, '000000', 102, '0,100,102', '市场部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
||||||
insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
insert into sys_dept values(109, '000000', 102, '0,100,102', '财务部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 2、用户信息表
|
-- 2、用户信息表
|
||||||
@ -152,6 +154,7 @@ drop table if exists sys_user;
|
|||||||
create table if not exists sys_user
|
create table if not exists sys_user
|
||||||
(
|
(
|
||||||
user_id int8,
|
user_id int8,
|
||||||
|
tenant_id varchar(20) not null,
|
||||||
dept_id int8,
|
dept_id int8,
|
||||||
user_name varchar(30) not null,
|
user_name varchar(30) not null,
|
||||||
nick_name varchar(30) not null,
|
nick_name varchar(30) not null,
|
||||||
@ -176,6 +179,7 @@ create table if not exists sys_user
|
|||||||
|
|
||||||
comment on table sys_user is '用户信息表';
|
comment on table sys_user is '用户信息表';
|
||||||
comment on column sys_user.user_id is '用户ID';
|
comment on column sys_user.user_id is '用户ID';
|
||||||
|
comment on column sys_user.tenant_id is '租户编号';
|
||||||
comment on column sys_user.dept_id is '部门ID';
|
comment on column sys_user.dept_id is '部门ID';
|
||||||
comment on column sys_user.user_name is '用户账号';
|
comment on column sys_user.user_name is '用户账号';
|
||||||
comment on column sys_user.nick_name is '用户昵称';
|
comment on column sys_user.nick_name is '用户昵称';
|
||||||
@ -200,8 +204,8 @@ comment on column sys_user.remark is '备注';
|
|||||||
|
|
||||||
-- 初始化-用户信息表数据
|
-- 初始化-用户信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_user values(1, 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '管理员');
|
insert into sys_user values(1, '000000', 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '管理员');
|
||||||
insert into sys_user values(2, 105, 'ry', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '测试员');
|
insert into sys_user values(2, '000000', 105, 'lionli', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '测试员');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -211,6 +215,7 @@ drop table if exists sys_post;
|
|||||||
create table if not exists sys_post
|
create table if not exists sys_post
|
||||||
(
|
(
|
||||||
post_id int8,
|
post_id int8,
|
||||||
|
tenant_id varchar(20) not null,
|
||||||
post_code varchar(64) not null,
|
post_code varchar(64) not null,
|
||||||
post_name varchar(50) not null,
|
post_name varchar(50) not null,
|
||||||
post_sort int4 not null,
|
post_sort int4 not null,
|
||||||
@ -226,6 +231,7 @@ create table if not exists sys_post
|
|||||||
|
|
||||||
comment on table sys_post is '岗位信息表';
|
comment on table sys_post is '岗位信息表';
|
||||||
comment on column sys_post.post_id is '岗位ID';
|
comment on column sys_post.post_id is '岗位ID';
|
||||||
|
comment on column sys_post.tenant_id is '租户编号';
|
||||||
comment on column sys_post.post_code is '岗位编码';
|
comment on column sys_post.post_code is '岗位编码';
|
||||||
comment on column sys_post.post_name is '岗位名称';
|
comment on column sys_post.post_name is '岗位名称';
|
||||||
comment on column sys_post.post_sort is '显示顺序';
|
comment on column sys_post.post_sort is '显示顺序';
|
||||||
@ -240,10 +246,10 @@ comment on column sys_post.remark is '备注';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-岗位信息表数据
|
-- 初始化-岗位信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_post values(1, 'ceo', '董事长', 1, '0', 103, 1, now(), null, null, '');
|
insert into sys_post values(1, '000000', 'ceo', '董事长', 1, '0', 103, 1, now(), null, null, '');
|
||||||
insert into sys_post values(2, 'se', '项目经理', 2, '0', 103, 1, now(), null, null, '');
|
insert into sys_post values(2, '000000', 'se', '项目经理', 2, '0', 103, 1, now(), null, null, '');
|
||||||
insert into sys_post values(3, 'hr', '人力资源', 3, '0', 103, 1, now(), null, null, '');
|
insert into sys_post values(3, '000000', 'hr', '人力资源', 3, '0', 103, 1, now(), null, null, '');
|
||||||
insert into sys_post values(4, 'user', '普通员工', 4, '0', 103, 1, now(), null, null, '');
|
insert into sys_post values(4, '000000', 'user', '普通员工', 4, '0', 103, 1, now(), null, null, '');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 4、角色信息表
|
-- 4、角色信息表
|
||||||
@ -252,6 +258,7 @@ drop table if exists sys_role;
|
|||||||
create table if not exists sys_role
|
create table if not exists sys_role
|
||||||
(
|
(
|
||||||
role_id int8,
|
role_id int8,
|
||||||
|
tenant_id varchar(20) not null,
|
||||||
role_name varchar(30) not null,
|
role_name varchar(30) not null,
|
||||||
role_key varchar(100) not null,
|
role_key varchar(100) not null,
|
||||||
role_sort int4 not null,
|
role_sort int4 not null,
|
||||||
@ -271,6 +278,7 @@ create table if not exists sys_role
|
|||||||
|
|
||||||
comment on table sys_role is '角色信息表';
|
comment on table sys_role is '角色信息表';
|
||||||
comment on column sys_role.role_id is '角色ID';
|
comment on column sys_role.role_id is '角色ID';
|
||||||
|
comment on column sys_role.tenant_id is '租户编号';
|
||||||
comment on column sys_role.role_name is '角色名称';
|
comment on column sys_role.role_name is '角色名称';
|
||||||
comment on column sys_role.role_key is '角色权限字符串';
|
comment on column sys_role.role_key is '角色权限字符串';
|
||||||
comment on column sys_role.role_sort is '显示顺序';
|
comment on column sys_role.role_sort is '显示顺序';
|
||||||
@ -289,8 +297,8 @@ comment on column sys_role.remark is '备注';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-角色信息表数据
|
-- 初始化-角色信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_role values('1', '超级管理员', 'admin', 1, '1', 't', 't', '0', '0', 103, 1, now(), null, null, '超级管理员');
|
insert into sys_role values('1', '000000', '超级管理员', 'admin', 1, '1', 't', 't', '0', '0', 103, 1, now(), null, null, '超级管理员');
|
||||||
insert into sys_role values('2', '普通角色', 'common', 2, '2', 't', 't', '0', '0', 103, 1, now(), null, null, '普通角色');
|
insert into sys_role values('2', '000000', '普通角色', 'common', 2, '2', 't', 't', '0', '0', 103, 1, now(), null, null, '普通角色');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -625,6 +633,7 @@ drop table if exists sys_oper_log;
|
|||||||
create table if not exists sys_oper_log
|
create table if not exists sys_oper_log
|
||||||
(
|
(
|
||||||
oper_id int8,
|
oper_id int8,
|
||||||
|
tenant_id varchar(20) not null,
|
||||||
title varchar(50) default ''::varchar,
|
title varchar(50) default ''::varchar,
|
||||||
business_type int4 default 0,
|
business_type int4 default 0,
|
||||||
method varchar(100) default ''::varchar,
|
method varchar(100) default ''::varchar,
|
||||||
@ -645,6 +654,7 @@ create table if not exists sys_oper_log
|
|||||||
|
|
||||||
comment on table sys_oper_log is '操作日志记录';
|
comment on table sys_oper_log is '操作日志记录';
|
||||||
comment on column sys_oper_log.oper_id is '日志主键';
|
comment on column sys_oper_log.oper_id is '日志主键';
|
||||||
|
comment on column sys_oper_log.tenant_id is '租户编号';
|
||||||
comment on column sys_oper_log.title is '模块标题';
|
comment on column sys_oper_log.title is '模块标题';
|
||||||
comment on column sys_oper_log.business_type is '业务类型(0其它 1新增 2修改 3删除)';
|
comment on column sys_oper_log.business_type is '业务类型(0其它 1新增 2修改 3删除)';
|
||||||
comment on column sys_oper_log.method is '方法名称';
|
comment on column sys_oper_log.method is '方法名称';
|
||||||
@ -818,6 +828,7 @@ drop table if exists sys_logininfor;
|
|||||||
create table if not exists sys_logininfor
|
create table if not exists sys_logininfor
|
||||||
(
|
(
|
||||||
info_id int8,
|
info_id int8,
|
||||||
|
tenant_id varchar(20) not null,
|
||||||
user_name varchar(50) default ''::varchar,
|
user_name varchar(50) default ''::varchar,
|
||||||
ipaddr varchar(128) default ''::varchar,
|
ipaddr varchar(128) default ''::varchar,
|
||||||
login_location varchar(255) default ''::varchar,
|
login_location varchar(255) default ''::varchar,
|
||||||
@ -831,6 +842,7 @@ create table if not exists sys_logininfor
|
|||||||
|
|
||||||
comment on table sys_logininfor is '系统访问记录';
|
comment on table sys_logininfor is '系统访问记录';
|
||||||
comment on column sys_logininfor.info_id is '访问ID';
|
comment on column sys_logininfor.info_id is '访问ID';
|
||||||
|
comment on column sys_logininfor.tenant_id is '租户编号';
|
||||||
comment on column sys_logininfor.user_name is '用户账号';
|
comment on column sys_logininfor.user_name is '用户账号';
|
||||||
comment on column sys_logininfor.ipaddr is '登录IP地址';
|
comment on column sys_logininfor.ipaddr is '登录IP地址';
|
||||||
comment on column sys_logininfor.login_location is '登录地点';
|
comment on column sys_logininfor.login_location is '登录地点';
|
||||||
@ -847,6 +859,7 @@ drop table if exists sys_notice;
|
|||||||
create table if not exists sys_notice
|
create table if not exists sys_notice
|
||||||
(
|
(
|
||||||
notice_id int8,
|
notice_id int8,
|
||||||
|
tenant_id varchar(20) not null,
|
||||||
notice_title varchar(50) not null,
|
notice_title varchar(50) not null,
|
||||||
notice_type char not null,
|
notice_type char not null,
|
||||||
notice_content text,
|
notice_content text,
|
||||||
@ -862,6 +875,7 @@ create table if not exists sys_notice
|
|||||||
|
|
||||||
comment on table sys_notice is '通知公告表';
|
comment on table sys_notice is '通知公告表';
|
||||||
comment on column sys_notice.notice_id is '公告ID';
|
comment on column sys_notice.notice_id is '公告ID';
|
||||||
|
comment on column sys_notice.tenant_id is '租户编号';
|
||||||
comment on column sys_notice.notice_title is '公告标题';
|
comment on column sys_notice.notice_title is '公告标题';
|
||||||
comment on column sys_notice.notice_type is '公告类型(1通知 2公告)';
|
comment on column sys_notice.notice_type is '公告类型(1通知 2公告)';
|
||||||
comment on column sys_notice.notice_content is '公告内容';
|
comment on column sys_notice.notice_content is '公告内容';
|
||||||
@ -876,8 +890,8 @@ comment on column sys_notice.remark is '备注';
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-公告信息表数据
|
-- 初始化-公告信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_notice values('1', '温馨提醒:2018-07-01 新版本发布啦', '2', '新版本内容', '0', 103, 1, now(), null, null, '管理员');
|
insert into sys_notice values('1', '000000', '温馨提醒:2018-07-01 新版本发布啦', '2', '新版本内容', '0', 103, 1, now(), null, null, '管理员');
|
||||||
insert into sys_notice values('2', '维护通知:2018-07-01 系统凌晨维护', '1', '维护内容', '0', 103, 1, now(), null, null, '管理员');
|
insert into sys_notice values('2', '000000', '维护通知:2018-07-01 系统凌晨维护', '1', '维护内容', '0', 103, 1, now(), null, null, '管理员');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -996,6 +1010,7 @@ drop table if exists sys_oss;
|
|||||||
create table if not exists sys_oss
|
create table if not exists sys_oss
|
||||||
(
|
(
|
||||||
oss_id int8,
|
oss_id int8,
|
||||||
|
tenant_id varchar(20) not null,
|
||||||
file_name varchar(255) default ''::varchar not null,
|
file_name varchar(255) default ''::varchar not null,
|
||||||
original_name varchar(255) default ''::varchar not null,
|
original_name varchar(255) default ''::varchar not null,
|
||||||
file_suffix varchar(10) default ''::varchar not null,
|
file_suffix varchar(10) default ''::varchar not null,
|
||||||
@ -1011,6 +1026,7 @@ create table if not exists sys_oss
|
|||||||
|
|
||||||
comment on table sys_oss is 'OSS对象存储表';
|
comment on table sys_oss is 'OSS对象存储表';
|
||||||
comment on column sys_oss.oss_id is '对象存储主键';
|
comment on column sys_oss.oss_id is '对象存储主键';
|
||||||
|
comment on column sys_oss.tenant_id is '租户编码';
|
||||||
comment on column sys_oss.file_name is '文件名';
|
comment on column sys_oss.file_name is '文件名';
|
||||||
comment on column sys_oss.original_name is '原名';
|
comment on column sys_oss.original_name is '原名';
|
||||||
comment on column sys_oss.file_suffix is '文件后缀名';
|
comment on column sys_oss.file_suffix is '文件后缀名';
|
||||||
@ -1029,6 +1045,7 @@ drop table if exists sys_oss_config;
|
|||||||
create table if not exists sys_oss_config
|
create table if not exists sys_oss_config
|
||||||
(
|
(
|
||||||
oss_config_id int8,
|
oss_config_id int8,
|
||||||
|
tenant_id varchar(20) not null,
|
||||||
config_key varchar(20) default ''::varchar not null,
|
config_key varchar(20) default ''::varchar not null,
|
||||||
access_key varchar(255) default ''::varchar,
|
access_key varchar(255) default ''::varchar,
|
||||||
secret_key varchar(255) default ''::varchar,
|
secret_key varchar(255) default ''::varchar,
|
||||||
@ -1052,6 +1069,7 @@ create table if not exists sys_oss_config
|
|||||||
|
|
||||||
comment on table sys_oss_config is '对象存储配置表';
|
comment on table sys_oss_config is '对象存储配置表';
|
||||||
comment on column sys_oss_config.oss_config_id is '主建';
|
comment on column sys_oss_config.oss_config_id is '主建';
|
||||||
|
comment on column sys_oss_config.tenant_id is '租户编码';
|
||||||
comment on column sys_oss_config.config_key is '配置key';
|
comment on column sys_oss_config.config_key is '配置key';
|
||||||
comment on column sys_oss_config.access_key is 'accessKey';
|
comment on column sys_oss_config.access_key is 'accessKey';
|
||||||
comment on column sys_oss_config.secret_key is '秘钥';
|
comment on column sys_oss_config.secret_key is '秘钥';
|
||||||
@ -1071,11 +1089,11 @@ comment on column sys_oss_config.update_by is '更新者';
|
|||||||
comment on column sys_oss_config.update_time is '更新时间';
|
comment on column sys_oss_config.update_time is '更新时间';
|
||||||
comment on column sys_oss_config.remark is '备注';
|
comment on column sys_oss_config.remark is '备注';
|
||||||
|
|
||||||
insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1', '0', '', 103, 1, now(), 1, now(), null);
|
insert into sys_oss_config values (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1', '0', '', 103, 1, now(), 1, now(), null);
|
||||||
insert into sys_oss_config values (2, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1', '1', '', 103, 1, now(), 1, now(), null);
|
insert into sys_oss_config values (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1', '1', '', 103, 1, now(), 1, now(), null);
|
||||||
insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1', '1', '', 103, 1, now(), 1, now(), null);
|
insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1', '1', '', 103, 1, now(), 1, now(), null);
|
||||||
insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', 103, 1, now(), 1, now(), null);
|
insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', 103, 1, now(), 1, now(), null);
|
||||||
insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', 103, 1, now(), 1, now(), NULL);
|
insert into sys_oss_config values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', 103, 1, now(), 1, now(), NULL);
|
||||||
|
|
||||||
-- 字符串自动转时间 避免框架时间查询报错问题
|
-- 字符串自动转时间 避免框架时间查询报错问题
|
||||||
create or replace function cast_varchar_to_timestamp(varchar) returns timestamptz as $$
|
create or replace function cast_varchar_to_timestamp(varchar) returns timestamptz as $$
|
||||||
|
|||||||
@ -60,6 +60,7 @@ create table sys_tenant_package (
|
|||||||
drop table if exists sys_dept;
|
drop table if exists sys_dept;
|
||||||
create table sys_dept (
|
create table sys_dept (
|
||||||
dept_id bigint(20) not null comment '部门id',
|
dept_id bigint(20) not null comment '部门id',
|
||||||
|
tenant_id varchar(20) not null comment '租户编号',
|
||||||
parent_id bigint(20) default 0 comment '父部门id',
|
parent_id bigint(20) default 0 comment '父部门id',
|
||||||
ancestors varchar(500) default '' comment '祖级列表',
|
ancestors varchar(500) default '' comment '祖级列表',
|
||||||
dept_name varchar(30) default '' comment '部门名称',
|
dept_name varchar(30) default '' comment '部门名称',
|
||||||
@ -82,16 +83,16 @@ create table sys_dept (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
||||||
|
|
||||||
insert into sys_dept values(100, 0, '0', 'XXX科技', 0, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
insert into sys_dept values(100, '000000', 0, '0', 'XXX科技', 0, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
||||||
insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
insert into sys_dept values(101, '000000', 100, '0,100', '深圳总公司', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
||||||
insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
insert into sys_dept values(102, '000000', 100, '0,100', '长沙分公司', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
||||||
insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
insert into sys_dept values(103, '000000', 101, '0,100,101', '研发部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
||||||
insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
insert into sys_dept values(104, '000000', 101, '0,100,101', '市场部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
||||||
insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
insert into sys_dept values(105, '000000', 101, '0,100,101', '测试部门', 3, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
||||||
insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
insert into sys_dept values(106, '000000', 101, '0,100,101', '财务部门', 4, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
||||||
insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
insert into sys_dept values(107, '000000', 101, '0,100,101', '运维部门', 5, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
||||||
insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
insert into sys_dept values(108, '000000', 102, '0,100,102', '市场部门', 1, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
||||||
insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
insert into sys_dept values(109, '000000', 102, '0,100,102', '财务部门', 2, '疯狂的狮子Li', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate(), null, null);
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -100,6 +101,7 @@ insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '疯
|
|||||||
drop table if exists sys_user;
|
drop table if exists sys_user;
|
||||||
create table sys_user (
|
create table sys_user (
|
||||||
user_id bigint(20) not null comment '用户ID',
|
user_id bigint(20) not null comment '用户ID',
|
||||||
|
tenant_id varchar(20) not null comment '租户编号',
|
||||||
dept_id bigint(20) default null comment '部门ID',
|
dept_id bigint(20) default null comment '部门ID',
|
||||||
user_name varchar(30) not null comment '用户账号',
|
user_name varchar(30) not null comment '用户账号',
|
||||||
nick_name varchar(30) not null comment '用户昵称',
|
nick_name varchar(30) not null comment '用户昵称',
|
||||||
@ -125,8 +127,8 @@ create table sys_user (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-用户信息表数据
|
-- 初始化-用户信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_user values(1, 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '管理员');
|
insert into sys_user values(1, '000000', 103, 'admin', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '管理员');
|
||||||
insert into sys_user values(2, 105, 'lionli', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '测试员');
|
insert into sys_user values(2, '000000', 105, 'lionli', '疯狂的狮子Li', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 103, 1, sysdate(), null, null, '测试员');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -136,6 +138,7 @@ drop table if exists sys_post;
|
|||||||
create table sys_post
|
create table sys_post
|
||||||
(
|
(
|
||||||
post_id bigint(20) not null comment '岗位ID',
|
post_id bigint(20) not null comment '岗位ID',
|
||||||
|
tenant_id varchar(20) not null comment '租户编号',
|
||||||
post_code varchar(64) not null comment '岗位编码',
|
post_code varchar(64) not null comment '岗位编码',
|
||||||
post_name varchar(50) not null comment '岗位名称',
|
post_name varchar(50) not null comment '岗位名称',
|
||||||
post_sort int(4) not null comment '显示顺序',
|
post_sort int(4) not null comment '显示顺序',
|
||||||
@ -152,10 +155,10 @@ create table sys_post
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-岗位信息表数据
|
-- 初始化-岗位信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_post values(1, 'ceo', '董事长', 1, '0', 103, 1, sysdate(), null, null, '');
|
insert into sys_post values(1, '000000', 'ceo', '董事长', 1, '0', 103, 1, sysdate(), null, null, '');
|
||||||
insert into sys_post values(2, 'se', '项目经理', 2, '0', 103, 1, sysdate(), null, null, '');
|
insert into sys_post values(2, '000000', 'se', '项目经理', 2, '0', 103, 1, sysdate(), null, null, '');
|
||||||
insert into sys_post values(3, 'hr', '人力资源', 3, '0', 103, 1, sysdate(), null, null, '');
|
insert into sys_post values(3, '000000', 'hr', '人力资源', 3, '0', 103, 1, sysdate(), null, null, '');
|
||||||
insert into sys_post values(4, 'user', '普通员工', 4, '0', 103, 1, sysdate(), null, null, '');
|
insert into sys_post values(4, '000000', 'user', '普通员工', 4, '0', 103, 1, sysdate(), null, null, '');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -164,6 +167,7 @@ insert into sys_post values(4, 'user', '普通员工', 4, '0', 103, 1, sysdate(
|
|||||||
drop table if exists sys_role;
|
drop table if exists sys_role;
|
||||||
create table sys_role (
|
create table sys_role (
|
||||||
role_id bigint(20) not null comment '角色ID',
|
role_id bigint(20) not null comment '角色ID',
|
||||||
|
tenant_id varchar(20) not null comment '租户编号',
|
||||||
role_name varchar(30) not null comment '角色名称',
|
role_name varchar(30) not null comment '角色名称',
|
||||||
role_key varchar(100) not null comment '角色权限字符串',
|
role_key varchar(100) not null comment '角色权限字符串',
|
||||||
role_sort int(4) not null comment '显示顺序',
|
role_sort int(4) not null comment '显示顺序',
|
||||||
@ -184,8 +188,8 @@ create table sys_role (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-角色信息表数据
|
-- 初始化-角色信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_role values('1', '超级管理员', 'admin', 1, 1, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '超级管理员');
|
insert into sys_role values(1, '000000', '超级管理员', 'admin', 1, 1, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '超级管理员');
|
||||||
insert into sys_role values('2', '普通角色', 'common', 2, 2, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '普通角色');
|
insert into sys_role values(2, '000000', '普通角色', 'common', 2, 2, 1, 1, '0', '0', 103, 1, sysdate(), null, null, '普通角色');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -477,6 +481,7 @@ insert into sys_user_post values ('2', '2');
|
|||||||
drop table if exists sys_oper_log;
|
drop table if exists sys_oper_log;
|
||||||
create table sys_oper_log (
|
create table sys_oper_log (
|
||||||
oper_id bigint(20) not null comment '日志主键',
|
oper_id bigint(20) not null comment '日志主键',
|
||||||
|
tenant_id varchar(20) not null comment '租户编号',
|
||||||
title varchar(50) default '' comment '模块标题',
|
title varchar(50) default '' comment '模块标题',
|
||||||
business_type int(2) default 0 comment '业务类型(0其它 1新增 2修改 3删除)',
|
business_type int(2) default 0 comment '业务类型(0其它 1新增 2修改 3删除)',
|
||||||
method varchar(100) default '' comment '方法名称',
|
method varchar(100) default '' comment '方法名称',
|
||||||
@ -610,6 +615,7 @@ insert into sys_config values(11, 'OSS预览列表资源开关', 'sys.os
|
|||||||
drop table if exists sys_logininfor;
|
drop table if exists sys_logininfor;
|
||||||
create table sys_logininfor (
|
create table sys_logininfor (
|
||||||
info_id bigint(20) not null comment '访问ID',
|
info_id bigint(20) not null comment '访问ID',
|
||||||
|
tenant_id varchar(20) not null comment '租户编号',
|
||||||
user_name varchar(50) default '' comment '用户账号',
|
user_name varchar(50) default '' comment '用户账号',
|
||||||
ipaddr varchar(128) default '' comment '登录IP地址',
|
ipaddr varchar(128) default '' comment '登录IP地址',
|
||||||
login_location varchar(255) default '' comment '登录地点',
|
login_location varchar(255) default '' comment '登录地点',
|
||||||
@ -628,6 +634,7 @@ create table sys_logininfor (
|
|||||||
drop table if exists sys_notice;
|
drop table if exists sys_notice;
|
||||||
create table sys_notice (
|
create table sys_notice (
|
||||||
notice_id bigint(20) not null comment '公告ID',
|
notice_id bigint(20) not null comment '公告ID',
|
||||||
|
tenant_id varchar(20) not null comment '租户编号',
|
||||||
notice_title varchar(50) not null comment '公告标题',
|
notice_title varchar(50) not null comment '公告标题',
|
||||||
notice_type char(1) not null comment '公告类型(1通知 2公告)',
|
notice_type char(1) not null comment '公告类型(1通知 2公告)',
|
||||||
notice_content longblob default null comment '公告内容',
|
notice_content longblob default null comment '公告内容',
|
||||||
@ -644,8 +651,8 @@ create table sys_notice (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 初始化-公告信息表数据
|
-- 初始化-公告信息表数据
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
insert into sys_notice values('1', '温馨提醒:2018-07-01 新版本发布啦', '2', '新版本内容', '0', 103, 1, sysdate(), null, null, '管理员');
|
insert into sys_notice values('1', '000000', '温馨提醒:2018-07-01 新版本发布啦', '2', '新版本内容', '0', 103, 1, sysdate(), null, null, '管理员');
|
||||||
insert into sys_notice values('2', '维护通知:2018-07-01 系统凌晨维护', '1', '维护内容', '0', 103, 1, sysdate(), null, null, '管理员');
|
insert into sys_notice values('2', '000000', '维护通知:2018-07-01 系统凌晨维护', '1', '维护内容', '0', 103, 1, sysdate(), null, null, '管理员');
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -715,6 +722,7 @@ create table gen_table_column (
|
|||||||
drop table if exists sys_oss;
|
drop table if exists sys_oss;
|
||||||
create table sys_oss (
|
create table sys_oss (
|
||||||
oss_id bigint(20) not null comment '对象存储主键',
|
oss_id bigint(20) not null comment '对象存储主键',
|
||||||
|
tenant_id varchar(20) not null comment '租户编号',
|
||||||
file_name varchar(255) not null default '' comment '文件名',
|
file_name varchar(255) not null default '' comment '文件名',
|
||||||
original_name varchar(255) not null default '' comment '原名',
|
original_name varchar(255) not null default '' comment '原名',
|
||||||
file_suffix varchar(10) not null default '' comment '文件后缀名',
|
file_suffix varchar(10) not null default '' comment '文件后缀名',
|
||||||
@ -734,6 +742,7 @@ create table sys_oss (
|
|||||||
drop table if exists sys_oss_config;
|
drop table if exists sys_oss_config;
|
||||||
create table sys_oss_config (
|
create table sys_oss_config (
|
||||||
oss_config_id bigint(20) not null comment '主建',
|
oss_config_id bigint(20) not null comment '主建',
|
||||||
|
tenant_id varchar(20) not null comment '租户编号',
|
||||||
config_key varchar(20) not null default '' comment '配置key',
|
config_key varchar(20) not null default '' comment '配置key',
|
||||||
access_key varchar(255) default '' comment 'accessKey',
|
access_key varchar(255) default '' comment 'accessKey',
|
||||||
secret_key varchar(255) default '' comment '秘钥',
|
secret_key varchar(255) default '' comment '秘钥',
|
||||||
@ -755,8 +764,8 @@ create table sys_oss_config (
|
|||||||
primary key (oss_config_id)
|
primary key (oss_config_id)
|
||||||
) engine=innodb comment='对象存储配置表';
|
) engine=innodb comment='对象存储配置表';
|
||||||
|
|
||||||
insert into sys_oss_config values (1, 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1' ,'0', '', 103, 1, sysdate(), 1, sysdate(), NULL);
|
insert into sys_oss_config values (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1' ,'0', '', 103, 1, sysdate(), 1, sysdate(), NULL);
|
||||||
insert into sys_oss_config values (2, 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
|
insert into sys_oss_config values (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
|
||||||
insert into sys_oss_config values (3, 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
|
insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
|
||||||
insert into sys_oss_config values (4, 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
|
insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
|
||||||
insert into sys_oss_config values (5, 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
|
insert into sys_oss_config values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1' ,'1', '', 103, 1, sysdate(), 1, sysdate(), NULL);
|
||||||
|
|||||||
@ -689,6 +689,7 @@ GO
|
|||||||
CREATE TABLE [sys_dept]
|
CREATE TABLE [sys_dept]
|
||||||
(
|
(
|
||||||
[dept_id] bigint NOT NULL,
|
[dept_id] bigint NOT NULL,
|
||||||
|
[tenant_id] nvarchar(20) NOT NULL,
|
||||||
[parent_id] bigint DEFAULT ((0)) NULL,
|
[parent_id] bigint DEFAULT ((0)) NULL,
|
||||||
[ancestors] nvarchar(500)DEFAULT '' NULL,
|
[ancestors] nvarchar(500)DEFAULT '' NULL,
|
||||||
[dept_name] nvarchar(30) DEFAULT '' NULL,
|
[dept_name] nvarchar(30) DEFAULT '' NULL,
|
||||||
@ -716,6 +717,12 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_dept',
|
'TABLE', N'sys_dept',
|
||||||
'COLUMN', N'dept_id'
|
'COLUMN', N'dept_id'
|
||||||
GO
|
GO
|
||||||
|
EXEC sys.sp_addextendedproperty
|
||||||
|
'MS_Description', N'租户编号' ,
|
||||||
|
'SCHEMA', N'dbo',
|
||||||
|
'TABLE', N'sys_dept',
|
||||||
|
'COLUMN', N'tenant_id'
|
||||||
|
GO
|
||||||
EXEC sys.sp_addextendedproperty
|
EXEC sys.sp_addextendedproperty
|
||||||
'MS_Description', N'父部门id' ,
|
'MS_Description', N'父部门id' ,
|
||||||
'SCHEMA', N'dbo',
|
'SCHEMA', N'dbo',
|
||||||
@ -806,25 +813,25 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_dept'
|
'TABLE', N'sys_dept'
|
||||||
GO
|
GO
|
||||||
|
|
||||||
INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (100, 0, N'0', N'XXX科技', 0, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
INSERT [sys_dept] ([dept_id], [tenant_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (100, N'000000', 0, N'0', N'XXX科技', 0, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (101, 100, N'0,100', N'深圳总公司', 1, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
INSERT [sys_dept] ([dept_id], [tenant_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (101, N'000000', 100, N'0,100', N'深圳总公司', 1, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (102, 100, N'0,100', N'长沙分公司', 2, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
INSERT [sys_dept] ([dept_id], [tenant_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (102, N'000000', 100, N'0,100', N'长沙分公司', 2, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (103, 101, N'0,100,101', N'研发部门', 1, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
INSERT [sys_dept] ([dept_id], [tenant_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (103, N'000000', 101, N'0,100,101', N'研发部门', 1, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (104, 101, N'0,100,101', N'市场部门', 2, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
INSERT [sys_dept] ([dept_id], [tenant_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (104, N'000000', 101, N'0,100,101', N'市场部门', 2, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (105, 101, N'0,100,101', N'测试部门', 3, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
INSERT [sys_dept] ([dept_id], [tenant_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (105, N'000000', 101, N'0,100,101', N'测试部门', 3, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (106, 101, N'0,100,101', N'财务部门', 4, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
INSERT [sys_dept] ([dept_id], [tenant_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (106, N'000000', 101, N'0,100,101', N'财务部门', 4, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (107, 101, N'0,100,101', N'运维部门', 5, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
INSERT [sys_dept] ([dept_id], [tenant_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (107, N'000000', 101, N'0,100,101', N'运维部门', 5, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (108, 102, N'0,100,102', N'市场部门', 1, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
INSERT [sys_dept] ([dept_id], [tenant_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (108, N'000000', 102, N'0,100,102', N'市场部门', 1, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
||||||
GO
|
GO
|
||||||
INSERT [sys_dept] ([dept_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (109, 102, N'0,100,102', N'财务部门', 2, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
INSERT [sys_dept] ([dept_id], [tenant_id], [parent_id], [ancestors], [dept_name], [order_num], [leader], [phone], [email], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time]) VALUES (109, N'000000', 102, N'0,100,102', N'财务部门', 2, N'疯狂的狮子Li', N'15888888888', N'xxx@qq.com', N'0', N'0', 103, 1, getdate(), NULL, NULL)
|
||||||
GO
|
GO
|
||||||
|
|
||||||
CREATE TABLE [sys_dict_data]
|
CREATE TABLE [sys_dict_data]
|
||||||
@ -1115,6 +1122,7 @@ GO
|
|||||||
CREATE TABLE [sys_logininfor]
|
CREATE TABLE [sys_logininfor]
|
||||||
(
|
(
|
||||||
[info_id] bigint NOT NULL,
|
[info_id] bigint NOT NULL,
|
||||||
|
[tenant_id] nvarchar(20) NOT NULL,
|
||||||
[user_name] nvarchar(50) DEFAULT '' NULL,
|
[user_name] nvarchar(50) DEFAULT '' NULL,
|
||||||
[ipaddr] nvarchar(128) DEFAULT '' NULL,
|
[ipaddr] nvarchar(128) DEFAULT '' NULL,
|
||||||
[login_location] nvarchar(255) DEFAULT '' NULL,
|
[login_location] nvarchar(255) DEFAULT '' NULL,
|
||||||
@ -1136,6 +1144,12 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_logininfor',
|
'TABLE', N'sys_logininfor',
|
||||||
'COLUMN', N'info_id'
|
'COLUMN', N'info_id'
|
||||||
GO
|
GO
|
||||||
|
EXEC sys.sp_addextendedproperty
|
||||||
|
'MS_Description', N'租户编号' ,
|
||||||
|
'SCHEMA', N'dbo',
|
||||||
|
'TABLE', N'sys_logininfor',
|
||||||
|
'COLUMN', N'tenant_id'
|
||||||
|
GO
|
||||||
EXEC sys.sp_addextendedproperty
|
EXEC sys.sp_addextendedproperty
|
||||||
'MS_Description', N'用户账号' ,
|
'MS_Description', N'用户账号' ,
|
||||||
'SCHEMA', N'dbo',
|
'SCHEMA', N'dbo',
|
||||||
@ -1516,6 +1530,7 @@ GO
|
|||||||
CREATE TABLE [sys_notice]
|
CREATE TABLE [sys_notice]
|
||||||
(
|
(
|
||||||
[notice_id] bigint NOT NULL,
|
[notice_id] bigint NOT NULL,
|
||||||
|
[tenant_id] nvarchar(20) NOT NULL,
|
||||||
[notice_title] nvarchar(50) NOT NULL,
|
[notice_title] nvarchar(50) NOT NULL,
|
||||||
[notice_type] nchar(1) NOT NULL,
|
[notice_type] nchar(1) NOT NULL,
|
||||||
[notice_content] nvarchar(max) NULL,
|
[notice_content] nvarchar(max) NULL,
|
||||||
@ -1540,6 +1555,12 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_notice',
|
'TABLE', N'sys_notice',
|
||||||
'COLUMN', N'notice_id'
|
'COLUMN', N'notice_id'
|
||||||
GO
|
GO
|
||||||
|
EXEC sys.sp_addextendedproperty
|
||||||
|
'MS_Description', N'租户编号' ,
|
||||||
|
'SCHEMA', N'dbo',
|
||||||
|
'TABLE', N'sys_notice',
|
||||||
|
'COLUMN', N'tenant_id'
|
||||||
|
GO
|
||||||
EXEC sys.sp_addextendedproperty
|
EXEC sys.sp_addextendedproperty
|
||||||
'MS_Description', N'公告标题' ,
|
'MS_Description', N'公告标题' ,
|
||||||
'SCHEMA', N'dbo',
|
'SCHEMA', N'dbo',
|
||||||
@ -1606,14 +1627,15 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_notice'
|
'TABLE', N'sys_notice'
|
||||||
GO
|
GO
|
||||||
|
|
||||||
INSERT [sys_notice] ([notice_id], [notice_title], [notice_type], [notice_content], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'温馨提醒:2018-07-01 若依新版本发布啦', N'2', N'<p>1111111111</p>', N'0', 103, 1, getdate(), 1, getdate(), N'管理员')
|
INSERT [sys_notice] ([notice_id], [tenant_id], [notice_title], [notice_type], [notice_content], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'000000', N'温馨提醒:2018-07-01 若依新版本发布啦', N'2', N'新版本内容', N'0', 103, 1, getdate(), NULL, NULL, N'管理员')
|
||||||
GO
|
GO
|
||||||
INSERT [sys_notice] ([notice_id], [notice_title], [notice_type], [notice_content], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'维护通知:2018-07-01 若依系统凌晨维护', N'1', N'<p><img src="/dev-api/profile/upload/2021/12/04/f1e00aba-0182-46b0-9c65-7804dfd0ea4e.png"></p>', N'0', 103, 1, getdate(), 1, getdate(), N'管理员')
|
INSERT [sys_notice] ([notice_id], [tenant_id], [notice_title], [notice_type], [notice_content], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'000000', N'维护通知:2018-07-01 若依系统凌晨维护', N'1', N'维护内容', N'0', 103, 1, getdate(), NULL, NULL, N'管理员')
|
||||||
GO
|
GO
|
||||||
|
|
||||||
CREATE TABLE [sys_oper_log]
|
CREATE TABLE [sys_oper_log]
|
||||||
(
|
(
|
||||||
[oper_id] bigint NOT NULL,
|
[oper_id] bigint NOT NULL,
|
||||||
|
[tenant_id] nvarchar(20) NOT NULL,
|
||||||
[title] nvarchar(50) DEFAULT '' NULL,
|
[title] nvarchar(50) DEFAULT '' NULL,
|
||||||
[business_type] int DEFAULT ((0)) NULL,
|
[business_type] int DEFAULT ((0)) NULL,
|
||||||
[method] nvarchar(100) DEFAULT '' NULL,
|
[method] nvarchar(100) DEFAULT '' NULL,
|
||||||
@ -1642,6 +1664,12 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_oper_log',
|
'TABLE', N'sys_oper_log',
|
||||||
'COLUMN', N'oper_id'
|
'COLUMN', N'oper_id'
|
||||||
GO
|
GO
|
||||||
|
EXEC sys.sp_addextendedproperty
|
||||||
|
'MS_Description', N'租户编号' ,
|
||||||
|
'SCHEMA', N'dbo',
|
||||||
|
'TABLE', N'sys_oper_log',
|
||||||
|
'COLUMN', N'tenant_id'
|
||||||
|
GO
|
||||||
EXEC sys.sp_addextendedproperty
|
EXEC sys.sp_addextendedproperty
|
||||||
'MS_Description', N'模块标题' ,
|
'MS_Description', N'模块标题' ,
|
||||||
'SCHEMA', N'dbo',
|
'SCHEMA', N'dbo',
|
||||||
@ -1741,6 +1769,7 @@ GO
|
|||||||
CREATE TABLE [sys_post]
|
CREATE TABLE [sys_post]
|
||||||
(
|
(
|
||||||
[post_id] bigint NOT NULL,
|
[post_id] bigint NOT NULL,
|
||||||
|
[tenant_id] nvarchar(20) NOT NULL,
|
||||||
[post_code] nvarchar(64) NOT NULL,
|
[post_code] nvarchar(64) NOT NULL,
|
||||||
[post_name] nvarchar(50) NOT NULL,
|
[post_name] nvarchar(50) NOT NULL,
|
||||||
[post_sort] int NOT NULL,
|
[post_sort] int NOT NULL,
|
||||||
@ -1764,6 +1793,12 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_post',
|
'TABLE', N'sys_post',
|
||||||
'COLUMN', N'post_id'
|
'COLUMN', N'post_id'
|
||||||
GO
|
GO
|
||||||
|
EXEC sys.sp_addextendedproperty
|
||||||
|
'MS_Description', N'租户编号' ,
|
||||||
|
'SCHEMA', N'dbo',
|
||||||
|
'TABLE', N'sys_post',
|
||||||
|
'COLUMN', N'tenant_id'
|
||||||
|
GO
|
||||||
EXEC sys.sp_addextendedproperty
|
EXEC sys.sp_addextendedproperty
|
||||||
'MS_Description', N'岗位编码' ,
|
'MS_Description', N'岗位编码' ,
|
||||||
'SCHEMA', N'dbo',
|
'SCHEMA', N'dbo',
|
||||||
@ -1830,18 +1865,19 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_post'
|
'TABLE', N'sys_post'
|
||||||
GO
|
GO
|
||||||
|
|
||||||
INSERT [sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'ceo', N'董事长', 1, N'0', 103, 1, getdate(), NULL, NULL, N'')
|
INSERT [sys_post] ([post_id], [tenant_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'000000', N'ceo', N'董事长', 1, N'0', 103, 1, getdate(), NULL, NULL, N'')
|
||||||
GO
|
GO
|
||||||
INSERT [sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'se', N'项目经理', 2, N'0', 103, 1, getdate(), NULL, NULL, N'')
|
INSERT [sys_post] ([post_id], [tenant_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'000000', N'se', N'项目经理', 2, N'0', 103, 1, getdate(), NULL, NULL, N'')
|
||||||
GO
|
GO
|
||||||
INSERT [sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (3, N'hr', N'人力资源', 3, N'0', 103, 1, getdate(), NULL, NULL, N'')
|
INSERT [sys_post] ([post_id], [tenant_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (3, N'000000', N'hr', N'人力资源', 3, N'0', 103, 1, getdate(), NULL, NULL, N'')
|
||||||
GO
|
GO
|
||||||
INSERT [sys_post] ([post_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (4, N'user', N'普通员工', 4, N'0', 103, 1, getdate(), NULL, NULL, N'')
|
INSERT [sys_post] ([post_id], [tenant_id], [post_code], [post_name], [post_sort], [status], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (4, N'000000', N'user', N'普通员工', 4, N'0', 103, 1, getdate(), NULL, NULL, N'')
|
||||||
GO
|
GO
|
||||||
|
|
||||||
CREATE TABLE [sys_role]
|
CREATE TABLE [sys_role]
|
||||||
(
|
(
|
||||||
[role_id] bigint NOT NULL,
|
[role_id] bigint NOT NULL,
|
||||||
|
[tenant_id] nvarchar(20) NOT NULL,
|
||||||
[role_name] nvarchar(30) NOT NULL,
|
[role_name] nvarchar(30) NOT NULL,
|
||||||
[role_key] nvarchar(100) NOT NULL,
|
[role_key] nvarchar(100) NOT NULL,
|
||||||
[role_sort] int NOT NULL,
|
[role_sort] int NOT NULL,
|
||||||
@ -1869,6 +1905,12 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_role',
|
'TABLE', N'sys_role',
|
||||||
'COLUMN', N'role_id'
|
'COLUMN', N'role_id'
|
||||||
GO
|
GO
|
||||||
|
EXEC sys.sp_addextendedproperty
|
||||||
|
'MS_Description', N'租户编号' ,
|
||||||
|
'SCHEMA', N'dbo',
|
||||||
|
'TABLE', N'sys_role',
|
||||||
|
'COLUMN', N'tenant_id'
|
||||||
|
GO
|
||||||
EXEC sys.sp_addextendedproperty
|
EXEC sys.sp_addextendedproperty
|
||||||
'MS_Description', N'角色名称' ,
|
'MS_Description', N'角色名称' ,
|
||||||
'SCHEMA', N'dbo',
|
'SCHEMA', N'dbo',
|
||||||
@ -1959,9 +2001,9 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_role'
|
'TABLE', N'sys_role'
|
||||||
GO
|
GO
|
||||||
|
|
||||||
INSERT [sys_role] ([role_id], [role_name], [role_key], [role_sort], [data_scope], [menu_check_strictly], [dept_check_strictly], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'超级管理员', N'admin', 1, N'1', 1, 1, N'0', N'0', 103, 1, getdate(), NULL, NULL, N'超级管理员')
|
INSERT [sys_role] ([role_id], [tenant_id], [role_name], [role_key], [role_sort], [data_scope], [menu_check_strictly], [dept_check_strictly], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, N'000000', N'超级管理员', N'admin', 1, N'1', 1, 1, N'0', N'0', 103, 1, getdate(), NULL, NULL, N'超级管理员')
|
||||||
GO
|
GO
|
||||||
INSERT [sys_role] ([role_id], [role_name], [role_key], [role_sort], [data_scope], [menu_check_strictly], [dept_check_strictly], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'普通角色', N'common', 2, N'2', 1, 1, N'0', N'0', 103, 1, getdate(), 1, CAST(N'2021-12-04T15:44:20.0000000' AS DateTime2), N'普通角色')
|
INSERT [sys_role] ([role_id], [tenant_id], [role_name], [role_key], [role_sort], [data_scope], [menu_check_strictly], [dept_check_strictly], [status], [del_flag], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, N'000000', N'普通角色', N'common', 2, N'2', 1, 1, N'0', N'0', 103, 1, getdate(), NULL, NULL, N'普通角色')
|
||||||
GO
|
GO
|
||||||
|
|
||||||
CREATE TABLE [sys_role_dept]
|
CREATE TABLE [sys_role_dept]
|
||||||
@ -2197,6 +2239,7 @@ GO
|
|||||||
CREATE TABLE [sys_user]
|
CREATE TABLE [sys_user]
|
||||||
(
|
(
|
||||||
[user_id] bigint NOT NULL,
|
[user_id] bigint NOT NULL,
|
||||||
|
[tenant_id] nvarchar(20) NOT NULL,
|
||||||
[dept_id] bigint NULL,
|
[dept_id] bigint NULL,
|
||||||
[user_name] nvarchar(30) NOT NULL,
|
[user_name] nvarchar(30) NOT NULL,
|
||||||
[nick_name] nvarchar(30) NOT NULL,
|
[nick_name] nvarchar(30) NOT NULL,
|
||||||
@ -2229,6 +2272,12 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_user',
|
'TABLE', N'sys_user',
|
||||||
'COLUMN', N'user_id'
|
'COLUMN', N'user_id'
|
||||||
GO
|
GO
|
||||||
|
EXEC sys.sp_addextendedproperty
|
||||||
|
'MS_Description', N'租户编号' ,
|
||||||
|
'SCHEMA', N'dbo',
|
||||||
|
'TABLE', N'sys_user',
|
||||||
|
'COLUMN', N'tenant_id'
|
||||||
|
GO
|
||||||
EXEC sys.sp_addextendedproperty
|
EXEC sys.sp_addextendedproperty
|
||||||
'MS_Description', N'部门ID' ,
|
'MS_Description', N'部门ID' ,
|
||||||
'SCHEMA', N'dbo',
|
'SCHEMA', N'dbo',
|
||||||
@ -2349,9 +2398,9 @@ EXEC sys.sp_addextendedproperty
|
|||||||
'TABLE', N'sys_user'
|
'TABLE', N'sys_user'
|
||||||
GO
|
GO
|
||||||
|
|
||||||
INSERT [sys_user] ([user_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, 103, N'admin', N'疯狂的狮子Li', N'sys_user', N'crazyLionLi@163.com', N'15888888888', N'1', N'', N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), NULL, getdate(), N'管理员')
|
INSERT [sys_user] ([user_id], [tenant_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (1, 103, N'000000', N'admin', N'疯狂的狮子Li', N'sys_user', N'crazyLionLi@163.com', N'15888888888', N'1', N'', N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), NULL, NULL, N'管理员')
|
||||||
GO
|
GO
|
||||||
INSERT [sys_user] ([user_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, 105, N'ry', N'疯狂的狮子Li', N'sys_user', N'crazyLionLi@qq.com', N'15666666666', N'1', N'', N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), 1, getdate(), N'测试员')
|
INSERT [sys_user] ([user_id], [tenant_id], [dept_id], [user_name], [nick_name], [user_type], [email], [phonenumber], [sex], [avatar], [password], [status], [del_flag], [login_ip], [login_date], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (2, 105, N'000000', N'lionli', N'疯狂的狮子Li', N'sys_user', N'crazyLionLi@qq.com', N'15666666666', N'1', N'', N'$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', N'0', N'0', N'127.0.0.1', getdate(), 103, 1, getdate(), NULL, NULL, N'测试员')
|
||||||
GO
|
GO
|
||||||
|
|
||||||
CREATE TABLE [sys_user_post]
|
CREATE TABLE [sys_user_post]
|
||||||
@ -2425,6 +2474,7 @@ GO
|
|||||||
CREATE TABLE [sys_oss]
|
CREATE TABLE [sys_oss]
|
||||||
(
|
(
|
||||||
[oss_id] bigint NOT NULL,
|
[oss_id] bigint NOT NULL,
|
||||||
|
[tenant_id] nvarchar(20) NOT NULL,
|
||||||
[file_name] nvarchar(255) DEFAULT '' NOT NULL,
|
[file_name] nvarchar(255) DEFAULT '' NOT NULL,
|
||||||
[original_name] nvarchar(255) DEFAULT '' NOT NULL,
|
[original_name] nvarchar(255) DEFAULT '' NOT NULL,
|
||||||
[file_suffix] nvarchar(10) DEFAULT '' NOT NULL,
|
[file_suffix] nvarchar(10) DEFAULT '' NOT NULL,
|
||||||
@ -2448,6 +2498,12 @@ EXEC sp_addextendedproperty
|
|||||||
'TABLE', N'sys_oss',
|
'TABLE', N'sys_oss',
|
||||||
'COLUMN', N'oss_id'
|
'COLUMN', N'oss_id'
|
||||||
GO
|
GO
|
||||||
|
EXEC sys.sp_addextendedproperty
|
||||||
|
'MS_Description', N'租户编号' ,
|
||||||
|
'SCHEMA', N'dbo',
|
||||||
|
'TABLE', N'sys_oss',
|
||||||
|
'COLUMN', N'tenant_id'
|
||||||
|
GO
|
||||||
EXEC sp_addextendedproperty
|
EXEC sp_addextendedproperty
|
||||||
'MS_Description', N'文件名',
|
'MS_Description', N'文件名',
|
||||||
'SCHEMA', N'dbo',
|
'SCHEMA', N'dbo',
|
||||||
@ -2517,6 +2573,7 @@ GO
|
|||||||
CREATE TABLE [sys_oss_config]
|
CREATE TABLE [sys_oss_config]
|
||||||
(
|
(
|
||||||
[oss_config_id] bigint NOT NULL,
|
[oss_config_id] bigint NOT NULL,
|
||||||
|
[tenant_id] nvarchar(20) NOT NULL,
|
||||||
[config_key] nvarchar(20) DEFAULT '' NOT NULL,
|
[config_key] nvarchar(20) DEFAULT '' NOT NULL,
|
||||||
[access_key] nvarchar(255) DEFAULT '' NULL,
|
[access_key] nvarchar(255) DEFAULT '' NULL,
|
||||||
[secret_key] nvarchar(255) DEFAULT '' NULL,
|
[secret_key] nvarchar(255) DEFAULT '' NULL,
|
||||||
@ -2548,6 +2605,12 @@ EXEC sp_addextendedproperty
|
|||||||
'TABLE', N'sys_oss_config',
|
'TABLE', N'sys_oss_config',
|
||||||
'COLUMN', N'oss_config_id'
|
'COLUMN', N'oss_config_id'
|
||||||
GO
|
GO
|
||||||
|
EXEC sys.sp_addextendedproperty
|
||||||
|
'MS_Description', N'租户编号' ,
|
||||||
|
'SCHEMA', N'dbo',
|
||||||
|
'TABLE', N'sys_oss_config',
|
||||||
|
'COLUMN', N'tenant_id'
|
||||||
|
GO
|
||||||
EXEC sp_addextendedproperty
|
EXEC sp_addextendedproperty
|
||||||
'MS_Description', N'配置key',
|
'MS_Description', N'配置key',
|
||||||
'SCHEMA', N'dbo',
|
'SCHEMA', N'dbo',
|
||||||
@ -2662,13 +2725,13 @@ EXEC sp_addextendedproperty
|
|||||||
'TABLE', N'sys_oss_config'
|
'TABLE', N'sys_oss_config'
|
||||||
GO
|
GO
|
||||||
|
|
||||||
INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'minio', N'ruoyi', N'ruoyi123', N'ruoyi', N'', N'127.0.0.1:9000', N'',N'N', N'', N'1', N'0', N'', 103, 1, getdate(), 1, getdate(), NULL)
|
INSERT INTO [sys_oss_config] ([oss_config_id], [tenant_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'1', N'000000', N'minio', N'ruoyi', N'ruoyi123', N'ruoyi', N'', N'127.0.0.1:9000', N'',N'N', N'', N'1', N'0', N'', 103, 1, getdate(), 1, getdate(), NULL)
|
||||||
GO
|
GO
|
||||||
INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'qiniu', N'XXXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi', N'', N's3-cn-north-1.qiniucs.com', N'',N'N', N'', N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
|
INSERT INTO [sys_oss_config] ([oss_config_id], [tenant_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'2', N'000000', N'qiniu', N'XXXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi', N'', N's3-cn-north-1.qiniucs.com', N'',N'N', N'', N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
|
||||||
GO
|
GO
|
||||||
INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'3', N'aliyun', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi', N'', N'oss-cn-beijing.aliyuncs.com', N'',N'N', N'', N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
|
INSERT INTO [sys_oss_config] ([oss_config_id], [tenant_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'3', N'000000', N'aliyun', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi', N'', N'oss-cn-beijing.aliyuncs.com', N'',N'N', N'', N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
|
||||||
GO
|
GO
|
||||||
INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'4', N'qcloud', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi-1250000000', N'', N'cos.ap-beijing.myqcloud.com', N'',N'N', N'ap-beijing', N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
|
INSERT INTO [sys_oss_config] ([oss_config_id], [tenant_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'4', N'000000', N'qcloud', N'XXXXXXXXXXXXXXX', N'XXXXXXXXXXXXXXX', N'ruoyi-1250000000', N'', N'cos.ap-beijing.myqcloud.com', N'',N'N', N'ap-beijing', N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
|
||||||
GO
|
GO
|
||||||
INSERT INTO [sys_oss_config] ([oss_config_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'5', N'image', N'ruoyi', N'ruoyi123', N'ruoyi', N'image', N'127.0.0.1:9000', N'',N'N', N'', N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
|
INSERT INTO [sys_oss_config] ([oss_config_id], [tenant_id], [config_key], [access_key], [secret_key], [bucket_name], [prefix], [endpoint], [domain], [is_https], [region], [access_policy], [status], [ext1], [create_dept], [create_by], [create_time], [update_by], [update_time], [remark]) VALUES (N'5', N'000000', N'image', N'ruoyi', N'ruoyi123', N'ruoyi', N'image', N'127.0.0.1:9000', N'',N'N', N'', N'1', N'1', N'', 103, 1, getdate(), 1, getdate(), NULL)
|
||||||
GO
|
GO
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user