|
@@ -1,5 +1,6 @@
|
|
|
## 人员组织权限
|
|
|
# 1、集团(多租户)
|
|
|
+DROP TABLE IF EXISTS `org_group`;
|
|
|
create table org_group
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -13,6 +14,7 @@ create table org_group
|
|
|
) comment '集团';
|
|
|
|
|
|
# 2、公司
|
|
|
+DROP TABLE IF EXISTS `org_company`;
|
|
|
create table org_company
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -27,6 +29,7 @@ create table org_company
|
|
|
) comment '公司';
|
|
|
|
|
|
# 3、部门
|
|
|
+DROP TABLE IF EXISTS `org_dept`;
|
|
|
create table org_dept
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -44,6 +47,7 @@ create table org_dept
|
|
|
) comment '部门表';
|
|
|
|
|
|
# 4、岗位
|
|
|
+DROP TABLE IF EXISTS `org_job`;
|
|
|
create table org_job
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -59,6 +63,7 @@ create table org_job
|
|
|
) comment '岗位';
|
|
|
|
|
|
# 5、部门模板
|
|
|
+DROP TABLE IF EXISTS `org_dept_template`;
|
|
|
create table org_dept_template
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -72,6 +77,7 @@ create table org_dept_template
|
|
|
) comment '部门模板';
|
|
|
|
|
|
# 6、部门层级结构模版
|
|
|
+DROP TABLE IF EXISTS `org_dept_lv_template`;
|
|
|
create table org_dept_lv_template
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -86,6 +92,7 @@ create table org_dept_lv_template
|
|
|
) comment '部门层级结构模板';
|
|
|
|
|
|
# 7、岗位模版
|
|
|
+DROP TABLE IF EXISTS `org_job_template`;
|
|
|
create table org_job_template
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -99,6 +106,7 @@ create table org_job_template
|
|
|
) comment '岗位模版';
|
|
|
|
|
|
# 8、岗位模版与部门模版关系表
|
|
|
+DROP TABLE IF EXISTS `org_job_dept_template`;
|
|
|
create table org_job_dept_template
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -114,6 +122,7 @@ create table org_job_dept_template
|
|
|
|
|
|
|
|
|
# 9、人员
|
|
|
+DROP TABLE IF EXISTS `org_person`;
|
|
|
create table org_person
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -128,6 +137,7 @@ create table org_person
|
|
|
) comment '人员' ;
|
|
|
|
|
|
# 10、账号
|
|
|
+DROP TABLE IF EXISTS `org_account`;
|
|
|
create table org_account
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -143,6 +153,7 @@ create table org_account
|
|
|
) comment '账号';
|
|
|
|
|
|
# 11、项目数据权限
|
|
|
+DROP TABLE IF EXISTS `org_auth_prj_data`;
|
|
|
create table org_auth_prj_data
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -156,6 +167,7 @@ create table org_auth_prj_data
|
|
|
) comment '项目数据权限';
|
|
|
|
|
|
# 12、公司下的项目数据权限表
|
|
|
+DROP TABLE IF EXISTS `org_auth_company_prj`;
|
|
|
create table org_auth_company_prj
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -170,6 +182,7 @@ create table org_auth_company_prj
|
|
|
) comment '公司下的项目数据权限表';
|
|
|
|
|
|
# 13、项目下的公司数据表
|
|
|
+DROP TABLE IF EXISTS `org_rel_company_prj`;
|
|
|
create table org_rel_company_prj
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -184,6 +197,7 @@ create table org_rel_company_prj
|
|
|
) comment '项目下的公司数据表';
|
|
|
|
|
|
# 14、部门的项目数据权限表
|
|
|
+DROP TABLE IF EXISTS `org_auth_dept_prj`;
|
|
|
create table org_auth_dept_prj
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -198,6 +212,7 @@ create table org_auth_dept_prj
|
|
|
) comment '部门的项目数据权限表';
|
|
|
|
|
|
# 15、岗位&部门关系表
|
|
|
+DROP TABLE IF EXISTS `org_cfg_dept_job`;
|
|
|
create table org_cfg_dept_job
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -212,6 +227,7 @@ create table org_cfg_dept_job
|
|
|
) comment '岗位&部门关系表';
|
|
|
|
|
|
# 16、人员配置公司管理权限
|
|
|
+DROP TABLE IF EXISTS `org_cfg_person_company`;
|
|
|
create table org_cfg_person_company
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -226,6 +242,7 @@ create table org_cfg_person_company
|
|
|
) comment '人员配置公司管理权限';
|
|
|
|
|
|
# 17、人员配置项目数据权限
|
|
|
+DROP TABLE IF EXISTS `org_cfg_person_prj`;
|
|
|
create table org_cfg_person_prj
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -240,6 +257,7 @@ create table org_cfg_person_prj
|
|
|
) comment '人员配置项目数据权限';
|
|
|
|
|
|
# 18、人员与部门关系表
|
|
|
+DROP TABLE IF EXISTS `org_cfg_person_dept`;
|
|
|
create table org_cfg_person_dept
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -255,6 +273,7 @@ create table org_cfg_person_dept
|
|
|
) comment '人员与部门关系表';
|
|
|
|
|
|
# 19、人员与岗位关系表
|
|
|
+DROP TABLE IF EXISTS `org_cfg_person_job`;
|
|
|
create table org_cfg_person_job
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -269,6 +288,7 @@ create table org_cfg_person_job
|
|
|
) comment '人员与岗位关系表';
|
|
|
|
|
|
# 20、产品线
|
|
|
+DROP TABLE IF EXISTS `org_product`;
|
|
|
create table org_product
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -282,6 +302,7 @@ create table org_product
|
|
|
) comment '产品线';
|
|
|
|
|
|
# 21、应用
|
|
|
+DROP TABLE IF EXISTS `org_application`;
|
|
|
create table org_application
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -296,6 +317,7 @@ create table org_application
|
|
|
) comment '应用';
|
|
|
|
|
|
# 22、功能
|
|
|
+DROP TABLE IF EXISTS `org_function`;
|
|
|
create table org_function
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -310,6 +332,7 @@ create table org_function
|
|
|
) comment '功能';
|
|
|
|
|
|
# 23、功能层级
|
|
|
+DROP TABLE IF EXISTS `org_function_lv`;
|
|
|
create table org_function_lv
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -325,6 +348,7 @@ create table org_function_lv
|
|
|
|
|
|
|
|
|
# 24、集团配置应用
|
|
|
+DROP TABLE IF EXISTS `org_cfg_group_app`;
|
|
|
create table org_cfg_group_app
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -340,6 +364,7 @@ create table org_cfg_group_app
|
|
|
|
|
|
|
|
|
# 25、集团配置功能
|
|
|
+DROP TABLE IF EXISTS `org_cfg_group_func`;
|
|
|
create table org_cfg_group_func
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -354,6 +379,7 @@ create table org_cfg_group_func
|
|
|
) comment '集团配置功能';
|
|
|
|
|
|
# 26、项目配置应用
|
|
|
+DROP TABLE IF EXISTS `org_cfg_prj_app`;
|
|
|
create table org_cfg_prj_app
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -370,6 +396,7 @@ create table org_cfg_prj_app
|
|
|
|
|
|
|
|
|
# 27、项目配置功能
|
|
|
+DROP TABLE IF EXISTS `org_cfg_prj_func`;
|
|
|
create table org_cfg_prj_func
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -385,6 +412,7 @@ create table org_cfg_prj_func
|
|
|
) comment '项目配置功能';
|
|
|
|
|
|
# 28、岗位配置应用
|
|
|
+DROP TABLE IF EXISTS `org_cfg_job_app`;
|
|
|
create table org_cfg_job_app
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|
|
@@ -400,6 +428,7 @@ create table org_cfg_job_app
|
|
|
) comment '岗位配置应用';
|
|
|
|
|
|
# 29、岗位配置功能
|
|
|
+DROP TABLE IF EXISTS `org_cfg_job_func`;
|
|
|
create table org_cfg_job_func
|
|
|
(
|
|
|
id varchar(40) not null primary key ,
|