123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445 |
- ## 人员组织权限
- # 1、集团(多租户)
- DROP TABLE IF EXISTS `org_group`;
- create table org_group
- (
- id varchar(40) not null primary key ,
- code varchar(40) null,
- name varchar(255) null,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500) null
- ) comment '集团';
- # 2、公司
- DROP TABLE IF EXISTS `org_company`;
- create table org_company
- (
- id varchar(40) not null primary key ,
- name varchar(40) null,
- group_code varchar(40) not null ,
- parent_id varchar(40) null,
- create_user varchar(40) null,
- create_time timestamp null ,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500) null
- ) comment '公司';
- # 3、部门
- DROP TABLE IF EXISTS `org_dept`;
- create table org_dept
- (
- id varchar(40) not null primary key ,
- name varchar(40) not null ,
- parent_dept_id varchar(40) not null ,
- parent_company_id varchar(40) not null ,
- project_id varchar(40) not null ,
- group_code varchar(40) not null ,
- type varchar(40) not null comment '部门分类',
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '部门表';
- # 4、岗位
- DROP TABLE IF EXISTS `org_job`;
- create table org_job
- (
- id varchar(40) not null primary key ,
- name varchar(40) not null ,
- project_id varchar(40) not null ,
- group_code varchar(40) not null ,
- type varchar(40) not null comment '岗位类型',
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '岗位';
- # 5、部门模板
- DROP TABLE IF EXISTS `org_dept_template`;
- create table org_dept_template
- (
- id varchar(40) not null primary key ,
- name varchar(40) not null ,
- group_code varchar(40) not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '部门模板';
- # 6、部门层级结构模版
- DROP TABLE IF EXISTS `org_dept_lv_template`;
- create table org_dept_lv_template
- (
- id varchar(40) not null primary key ,
- name varchar(40) not null ,
- parent_id varchar(40) not null ,
- group_code varchar(40) not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '部门层级结构模板';
- # 7、岗位模版
- DROP TABLE IF EXISTS `org_job_template`;
- create table org_job_template
- (
- id varchar(40) not null primary key ,
- name varchar(40) not null ,
- group_code varchar(40) not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '岗位模版';
- # 8、岗位模版与部门模版关系表
- DROP TABLE IF EXISTS `org_job_dept_template`;
- create table org_job_dept_template
- (
- id varchar(40) not null primary key ,
- name varchar(40) not null ,
- parent_id varchar(40) not null ,
- group_code varchar(40) not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500) null
- ) comment '岗位模版与部门模版关系表';
- # 9、人员
- DROP TABLE IF EXISTS `org_person`;
- create table org_person
- (
- id varchar(40) not null primary key ,
- person_name varchar(40) null ,
- gender int null ,
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '人员' ;
- # 10、账号
- DROP TABLE IF EXISTS `org_account`;
- create table org_account
- (
- id varchar(40) not null primary key ,
- username varchar(40) null ,
- password varchar(40) null ,
- person_id varchar(40) null ,
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '账号';
- # 11、项目数据权限
- DROP TABLE IF EXISTS `org_auth_prj_data`;
- create table org_auth_prj_data
- (
- id varchar(40) not null primary key ,
- name varchar(40) not null ,
- group_code varchar(40) null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '项目数据权限';
- # 12、公司下的项目数据权限表
- DROP TABLE IF EXISTS `org_auth_company_prj`;
- create table org_auth_company_prj
- (
- id varchar(40) not null primary key ,
- company_id varchar(40) not null ,
- project_id varchar(40) not null ,
- group_code varchar(40) not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '公司下的项目数据权限表';
- # 13、项目下的公司数据表
- DROP TABLE IF EXISTS `org_rel_company_prj`;
- create table org_rel_company_prj
- (
- id varchar(40) not null primary key ,
- company_id varchar(40) not null ,
- project_id varchar(40) not null ,
- group_code varchar(40) not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '项目下的公司数据表';
- # 14、部门的项目数据权限表
- DROP TABLE IF EXISTS `org_auth_dept_prj`;
- create table org_auth_dept_prj
- (
- id varchar(40) not null primary key ,
- dept_id varchar(40) not null ,
- project_id varchar(40) not null ,
- group_code varchar(40) not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '部门的项目数据权限表';
- # 15、岗位&部门关系表
- DROP TABLE IF EXISTS `org_cfg_dept_job`;
- create table org_cfg_dept_job
- (
- id varchar(40) not null primary key ,
- dept_id varchar(40) not null comment '部门id',
- job_id varchar(40) not null comment '岗位id',
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '岗位&部门关系表';
- # 16、人员配置公司管理权限
- DROP TABLE IF EXISTS `org_cfg_person_company`;
- create table org_cfg_person_company
- (
- id varchar(40) not null primary key ,
- person_id varchar(40) not null comment '账号id',
- company_id varchar(40) not null comment '公司id',
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '人员配置公司管理权限';
- # 17、人员配置项目数据权限
- DROP TABLE IF EXISTS `org_cfg_person_prj`;
- create table org_cfg_person_prj
- (
- id varchar(40) not null primary key ,
- person_id varchar(40) not null comment '账号id',
- project_id varchar(40) not null comment '项目id',
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '人员配置项目数据权限';
- # 18、人员与部门关系表
- DROP TABLE IF EXISTS `org_cfg_person_dept`;
- create table org_cfg_person_dept
- (
- id varchar(40) not null primary key ,
- person_id varchar(40) not null comment '账号id',
- dept_id varchar(40) not null comment '部门id',
- major_dept int not null comment '是否为主部门',
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '人员与部门关系表';
- # 19、人员与岗位关系表
- DROP TABLE IF EXISTS `org_cfg_person_job`;
- create table org_cfg_person_job
- (
- id varchar(40) not null primary key ,
- person_id varchar(40) not null comment '账号id',
- dept_job_id varchar(40) not null comment '部门岗位关系id',
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '人员与岗位关系表';
- # 20、产品线
- DROP TABLE IF EXISTS `org_product`;
- create table org_product
- (
- id varchar(40) not null primary key ,
- code varchar(40) not null ,
- name varchar(40) not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '产品线';
- # 21、应用
- DROP TABLE IF EXISTS `org_application`;
- create table org_application
- (
- id varchar(40) not null primary key ,
- code varchar(40) not null ,
- name varchar(40) not null ,
- category varchar(40) not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '应用';
- # 22、功能
- DROP TABLE IF EXISTS `org_function`;
- create table org_function
- (
- id varchar(40) not null primary key ,
- code varchar(40) not null ,
- name varchar(40) not null ,
- app_code varchar(40) not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '功能';
- # 23、功能层级
- DROP TABLE IF EXISTS `org_function_lv`;
- create table org_function_lv
- (
- id varchar(40) not null primary key ,
- code varchar(40) not null ,
- name varchar(40) not null ,
- parent_id varchar(40) null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '功能层级';
- # 24、集团配置应用
- DROP TABLE IF EXISTS `org_cfg_group_app`;
- create table org_cfg_group_app
- (
- id varchar(40) not null primary key ,
- app_code varchar(40) not null ,
- group_code varchar(40) not null ,
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '集团配置应用';
- # 25、集团配置功能
- DROP TABLE IF EXISTS `org_cfg_group_func`;
- create table org_cfg_group_func
- (
- id varchar(40) not null primary key ,
- func_code varchar(40) not null ,
- group_code varchar(40) not null ,
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '集团配置功能';
- # 26、项目配置应用
- DROP TABLE IF EXISTS `org_cfg_prj_app`;
- create table org_cfg_prj_app
- (
- id varchar(40) not null primary key ,
- app_code varchar(40) not null ,
- project_id varchar(40) not null ,
- group_code varchar(40) not null ,
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '项目配置应用';
- # 27、项目配置功能
- DROP TABLE IF EXISTS `org_cfg_prj_func`;
- create table org_cfg_prj_func
- (
- id varchar(40) not null primary key ,
- func_code varchar(40) not null ,
- project_id varchar(40) not null ,
- group_code varchar(40) not null ,
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '项目配置功能';
- # 28、岗位配置应用
- DROP TABLE IF EXISTS `org_cfg_job_app`;
- create table org_cfg_job_app
- (
- id varchar(40) not null primary key ,
- app_code varchar(40) not null ,
- job_id varchar(40) not null ,
- group_code varchar(40) not null ,
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '岗位配置应用';
- # 29、岗位配置功能
- DROP TABLE IF EXISTS `org_cfg_job_func`;
- create table org_cfg_job_func
- (
- id varchar(40) not null primary key ,
- func_code varchar(40) not null ,
- app_code varchar(40) not null ,
- job_id varchar(40) not null ,
- group_code varchar(40) not null ,
- status int not null ,
- create_user varchar(40) null,
- create_time timestamp null,
- update_user varchar(40) null,
- update_time timestamp null,
- remark varchar(500)
- ) comment '岗位配置功能';
|