表调整

This commit is contained in:
dingruichao 2020-11-06 23:46:52 +08:00
parent b9652851d9
commit 9ffcb2efbd
1 changed files with 126 additions and 11 deletions

View File

@ -1,3 +1,20 @@
-- 1、服务组织申请表
drop table if exists service_organization_apply;
create table service_organization_apply (
id bigint(20) not null auto_increment comment 'ID',
name varchar(120) not null comment '企业名称',
contacts varchar(50) not null comment '联系人',
phone varchar(12) not null comment '联系电话',
license_url varchar(200) not null comment '营业执照图片地址',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(255) default null comment '备注',
primary key (id)
) engine=innodb auto_increment=10 comment = '服务组织申请表';
-- 1、服务组织表 -- 1、服务组织表
drop table if exists service_organization; drop table if exists service_organization;
create table service_organization ( create table service_organization (
@ -5,14 +22,18 @@ create table service_organization (
name varchar(120) not null comment '企业名称', name varchar(120) not null comment '企业名称',
contacts varchar(50) not null comment '联系人', contacts varchar(50) not null comment '联系人',
phone varchar(12) not null comment '联系电话', phone varchar(12) not null comment '联系电话',
license_url varchar(500) not null comment '营业执照图片地址(多个地址用,分隔)', fax varchar(12) not null comment '传真',
email varchar(24) not null comment '联系邮箱',
address varchar(24) not null comment '地址',
license_url varchar(500) not null comment '营业执照图片地址',
title varchar(50) not null comment '标题', title varchar(50) not null comment '标题',
introduction text not null comment '简介', introduction text not null comment '简介',
content text not null comment '机构详情内容', content text not null comment '机构详情内容',
hits int (6) default 0 comment '点击量', hits int (6) default 0 comment '点击量',
audit_status char(1) default '0' comment '状态0:待审核1审核不通过2审核通过', audit_status char(1) default '0' comment '状态0:待审核1审核不通过2审核通过',
picture_url varchar(500) not null comment '图片地址(多个地址用,分隔)', picture_url varchar(500) not null comment '图片地址',
status char(1) default '0' comment '状态0正常 1停用', status char(1) default '0' comment '状态0正常 1停用',
recommend_level char(1) default '0' comment '推荐级别0不作推荐1一级推按22级推荐',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除', del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者', create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间', create_time datetime comment '创建时间',
@ -24,12 +45,56 @@ create table service_organization (
primary key (id) primary key (id)
) engine=innodb auto_increment=10 comment = '服务组织表'; ) engine=innodb auto_increment=10 comment = '服务组织表';
-- 1、律师表
drop table if exists lawyer_team;
create table lawyer_team (
id bigint(20) not null auto_increment comment 'ID',
name varchar(120) not null comment '律师名称',
position varchar(50) not null comment '职位',
company_name varchar(120) not null comment '企业名称',
expertise_area varchar(120) not null comment '擅长领域',
picture_url varchar(500) not null comment '头像图片地址',
introduction text not null comment '简介',
content text not null comment '机构详情内容',
status char(1) default '0' comment '状态0正常 1停用',
recommend_level char(1) default '0' comment '推荐级别0不作推荐1一级推按22级推荐',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
remark varchar(255) default null comment '备注',
primary key (id)
) engine=innodb auto_increment=10 comment = '律师表';
-- 1、服务组织律师关系表
drop table if exists service_organization_lawyer;
create table service_organization_lawyer (
id bigint(20) not null auto_increment comment 'ID',
service_organization_id bigint(20) not null comment '服务组织id',
lawyer_team_id bigint(20) not null comment '律师团队id',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
check_by varchar(64) default '' comment '审核者',
check_time datetime comment '审核时间',
remark varchar(255) default null comment '备注',
primary key (id)
) engine=innodb auto_increment=10 comment = '服务组织律师关系表';
-- 2、 合同分类表 -- 2、 合同分类表
drop table if exists contract_type; drop table if exists contract_type;
create table contract_type ( create table contract_type (
id bigint(20) not null auto_increment comment 'ID', id bigint(20) not null auto_increment comment 'ID',
name varchar(50) not null comment '分类名称', name varchar(50) not null comment '分类名称',
english_name varchar(50) not null comment '英文名称', english_name varchar(50) not null comment '英文名称',
picture_url varchar(500) not null comment '图片地址1',
picture_url2 varchar(500) not null comment '图片地址2',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除', del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者', create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间', create_time datetime comment '创建时间',
@ -51,6 +116,7 @@ create table contract_template (
enclosure_name varchar(60) not null comment '附件名称', enclosure_name varchar(60) not null comment '附件名称',
enclosure_url varchar(500) not null comment '附件地址', enclosure_url varchar(500) not null comment '附件地址',
status char(1) default '0' comment '状态0正常 1停用', status char(1) default '0' comment '状态0正常 1停用',
recommend_level char(1) default '0' comment '推荐级别0不作推荐1一级推按22级推荐',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除', del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者', create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间', create_time datetime comment '创建时间',
@ -61,6 +127,23 @@ create table contract_template (
) engine=innodb auto_increment=10 comment = '合同模板表'; ) engine=innodb auto_increment=10 comment = '合同模板表';
-- 1、合同模板、常见问题关系表
drop table if exists contract_template_problem;
create table contract_template_problem (
id bigint(20) not null auto_increment comment 'ID',
contract_template_id bigint(20) not null comment '合同模板id',
common_problem_id bigint(20) not null comment '常见问题id',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
check_by varchar(64) default '' comment '审核者',
check_time datetime comment '审核时间',
remark varchar(255) default null comment '备注',
primary key (id)
) engine=innodb auto_increment=10 comment = '合同模板、常见问题关系表';
-- 4、 典型案例表 -- 4、 典型案例表
drop table if exists classsic_cases; drop table if exists classsic_cases;
create table classsic_cases ( create table classsic_cases (
@ -68,10 +151,12 @@ create table classsic_cases (
title varchar(50) not null comment '标题', title varchar(50) not null comment '标题',
introduction text not null comment '简介', introduction text not null comment '简介',
content text not null comment '详情内容', content text not null comment '详情内容',
problem_desc varchar(100) default null comment '问题描述',
type varchar(100) not null comment '案例类型(来至于字典表)', type varchar(100) not null comment '案例类型(来至于字典表)',
hits int (6) default 0 comment '点击量', hits int (6) default 0 comment '点击量',
picture_url varchar(500) not null comment '图片地址(多个地址用,分隔)', picture_url varchar(500) not null comment '图片地址(多个地址用,分隔)',
status char(1) default '0' comment '状态0正常 1停用', status char(1) default '0' comment '状态0正常 1停用',
recommend_level char(1) default '0' comment '推荐级别0不作推荐1一级推按22级推荐',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除', del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者', create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间', create_time datetime comment '创建时间',
@ -81,6 +166,21 @@ create table classsic_cases (
) engine=innodb auto_increment=10 comment = '典型案例表'; ) engine=innodb auto_increment=10 comment = '典型案例表';
-- 4、 典型案例问题解决建议表,一个案例可能对应多个案例
drop table if exists classsic_cases_proposal;
create table classsic_cases_proposal (
id bigint(20) not null auto_increment comment 'ID',
classsic_cases_id bigint(20) not null comment '典型案例id',
content text not null comment '建议内容',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间',
update_by varchar(64) default '' comment '更新者',
update_time datetime comment '更新时间',
primary key (id)
) engine=innodb auto_increment=10 comment = '典型案例问题解决建议表';
-- 5、 线上课程代表 -- 5、 线上课程代表
drop table if exists online_courses; drop table if exists online_courses;
create table online_courses ( create table online_courses (
@ -91,6 +191,7 @@ create table online_courses (
target_people varchar(64) not null comment '针对人群', target_people varchar(64) not null comment '针对人群',
courses_duration varchar(12) not null comment '视频课程时长', courses_duration varchar(12) not null comment '视频课程时长',
courses_level int (1) not null comment '课程难度等级', courses_level int (1) not null comment '课程难度等级',
recommend_level char(1) default '0' comment '推荐级别0不作推荐1一级推按22级推荐',
picture_url varchar(500) not null comment '图片地址(多个地址用,分隔)', picture_url varchar(500) not null comment '图片地址(多个地址用,分隔)',
video_url varchar(500) not null comment '视频地址(多个地址用,分隔)', video_url varchar(500) not null comment '视频地址(多个地址用,分隔)',
status char(1) default '0' comment '状态0正常 1停用', status char(1) default '0' comment '状态0正常 1停用',
@ -133,6 +234,7 @@ create table news_information (
content text not null comment '详情内容', content text not null comment '详情内容',
hits int (6) default 0 comment '点击量', hits int (6) default 0 comment '点击量',
status char(1) default '0' comment '状态0正常 1停用', status char(1) default '0' comment '状态0正常 1停用',
recommend_level char(1) default '0' comment '推荐级别0不作推荐1一级推按22级推荐',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除', del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者', create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间', create_time datetime comment '创建时间',
@ -162,13 +264,20 @@ create table online_message (
drop table if exists contact_information; drop table if exists contact_information;
create table contact_information ( create table contact_information (
id bigint(20) not null auto_increment comment 'ID', id bigint(20) not null auto_increment comment 'ID',
address varchar(150) not null comment '机构地址', address varchar(150) default '' comment '机构地址',
service_phone varchar(32) not null comment '服务电话', service_phone varchar(32) default '' comment '服务电话',
supervise_phone varchar(32) not null comment '监督电话', supervise_phone varchar(32) default '' comment '监督电话',
supervise_dept varchar(32) not null comment '监督部门', supervise_dept varchar(32) default '' comment '监督部门',
email varchar(32) not null comment '邮箱', supervise_dept_link varchar(120) default '' comment '监督部门链接',
service_date varchar(64) not null comment '服务时间', email varchar(32) default '' comment '邮箱',
copyright varchar(64) not null comment '版权所有', service_date varchar(64) default '' comment '服务时间',
copyright varchar(64) default '' comment '版权所有',
copyright_link varchar(120) default '' comment '版权所有链接',
business_committee varchar(120) default '' comment '商务委名称',
business_committee_link varchar(120) default '' comment '商务委链接',
copyright_picture_url varchar(120) default '' comment '版权图片地址',
copyright_picture_link varchar(120) default '' comment '版权图片链接',
type varchar(64) not null default '0' comment '联系方式类型1底部联系我们2右边浮窗3援助热线4平台介绍中的联系我们',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除', del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者', create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间', create_time datetime comment '创建时间',
@ -198,7 +307,7 @@ create table common_problem (
id bigint(20) not null auto_increment comment 'ID', id bigint(20) not null auto_increment comment 'ID',
title varchar(50) not null comment '标题', title varchar(50) not null comment '标题',
content text not null comment '问题描述内容', content text not null comment '问题描述内容',
explains text not null comment '内容', explains text not null comment '问题解析',
hits int (6) default 0 comment '点击量', hits int (6) default 0 comment '点击量',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除', del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者', create_by varchar(64) default '' comment '创建者',
@ -219,6 +328,7 @@ create table event_recruitment (
address varchar(120) not null comment '地址', address varchar(120) not null comment '地址',
organizer varchar(120) not null comment '主办单位', organizer varchar(120) not null comment '主办单位',
picture_url varchar(120) not null comment '图片地址', picture_url varchar(120) not null comment '图片地址',
recommend_level char(1) default '0' comment '推荐级别0不作推荐1一级推按22级推荐',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除', del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者', create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间', create_time datetime comment '创建时间',
@ -232,6 +342,7 @@ drop table if exists home_page_carousel;
create table home_page_carousel ( create table home_page_carousel (
id bigint(20) not null auto_increment comment 'ID', id bigint(20) not null auto_increment comment 'ID',
picture_url varchar(120) not null comment '图片地址', picture_url varchar(120) not null comment '图片地址',
orders int(2) default 0 comment '排序',
del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除', del_flag char(1) default '0' comment '删除标志0代表存在 2代表删除',
create_by varchar(64) default '' comment '创建者', create_by varchar(64) default '' comment '创建者',
create_time datetime comment '创建时间', create_time datetime comment '创建时间',
@ -253,4 +364,8 @@ INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`
INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (105, 1, '2级', '2', 'course_level', NULL, 'default', 'Y', '0', 'admin', '2020-11-06 14:30:15', '', NULL, NULL); INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (105, 1, '2级', '2', 'course_level', NULL, 'default', 'Y', '0', 'admin', '2020-11-06 14:30:15', '', NULL, NULL);
INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (106, 2, '3级', '3', 'course_level', NULL, 'default', 'Y', '0', 'admin', '2020-11-06 14:30:31', '', NULL, NULL); INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (106, 2, '3级', '3', 'course_level', NULL, 'default', 'Y', '0', 'admin', '2020-11-06 14:30:31', '', NULL, NULL);
INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (107, 3, '4级', '4', 'course_level', NULL, 'default', 'Y', '0', 'admin', '2020-11-06 14:30:50', '', NULL, NULL); INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (107, 3, '4级', '4', 'course_level', NULL, 'default', 'Y', '0', 'admin', '2020-11-06 14:30:50', '', NULL, NULL);
INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (108, 4, '5级', '5', 'course_level', NULL, 'default', 'Y', '0', 'admin', '2020-11-06 14:31:03', '', NULL, NULL); INSERT INTO `sys_dict_data`(`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (108, 4, '5级', '5', 'course_level', NULL, 'default', 'Y', '0', 'admin', '2020-11-06 14:31:03', '', NULL, NULL);
-- 特别提醒: 推荐级别在好几个表中都有,这个可以维护到字典中,方便使用和维护