sql

create table admin_user
(
id bigint(20) not null comment '自动增长id',
username varchar(64) not null comment '用户名',
password varchar(64) not null comment '密码',
company_id int  not null comment '公司id',
city_id int not null comment '城市id 杭州市:100 温州:200' ,
location_id int not null comment '位置id 如:西湖区 1001,余杭区 1002',
role_id int not null comment '角色id',
register_date datetime not null  comment '注册时间',
email varchar(64) not null comment '电子邮箱',
mob   varchar(64) not null comment '手机号码',
status int  not null comment '员工状态 1-在职 2-离职',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

create table company_name_check
(
id bigint(20) not null comment '自动增长id',
customer_nick varchar(64) not null comment '客户昵称',
customer_mob  varchar(64) not null comment '客户手机',
location_id int not null comment '位置id',
company_name varchar(64) not null comment '公司名称',
industry_type varchar(64) not null comment '行业类型',
company_type varchar(64) not null comment '公司类型',
validate_result varchar(128) not null comment '验证结果',
validate_status int not null comment '验证状态',
validate_date datetime not null comment '验证日期',
validate_user_id bigint(20) not null comment '验证员工id',
sales_user_id bigint(20) not null comment '销售员工id',
commit_date datetime not null comment '提交日期',
contact_nick varchar(64) not null comment '联系人昵称',
contact_mob varchar(64) not null comment '联系人手机',
contact_result varchar(128) not null comment '联系结果',
contact_status int not null comment '联系状态',
use_status int not null comment '0--未使用  1--已使用',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;


create table company_register_order
(
id bigint(20) not null comment '自动增长id',
cnc_id bigint(20) not comment '公司核名信息id',
sales_user_id bigint(20) not null comment '销售用户id',
manage_user_id bigint(20) not null comment '管理用户id',
handing_user_id bigint(20) not null comment '经办人用户id',
financial_user_id bigint(20) not null comment '财务用户id',
end_date datetime not null comment '截至日期',
contact_nick varchar(64) not null comment '联系人昵称',
contact_mob varchar(64) not null comment '联系人手机',
order_level int not null comment '0--加急订单 1--普通订单',
total_fee double not null comment '总费用',
coupon_fee double not null comment '优惠费用',
im_type int not null comment '1--QQ 2--微信',
im_no int not null comment 'im号码',
opt_type int not null comment '1--注册 2--变更',
status int not null comment '0--停止 1--开始',
company_scope varchar(256) not null comment '经营范围',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;


create table company_info
(
id bigint(20) not null comment '自动增长id',
location_id int not null comment '位置id',
company_name varchar(64) not null comment '公司名称',
industry_type varchar(64) not null comment '行业类型',
company_type varchar(64) not null comment '公司类型',
company_address varchar(512) not null comment '公司地址',
business_scope varchar(512) not null comment '经验范围',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

create table company_manager
(
id bigint(20) not null comment '自动增长id',
real_name varchar(64) not null comment '管理真实姓名',
id_card varchar(64) not null comment '身份证号码',
email varchar(64) not null comment '电子邮箱',
job_type varchar(64) not null comment '职位类型',
is_secret_service int not null comment '免骚扰服务 0-无 1-有',
is_master int not null comment '是否为法人 0-否 1-是',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

create table company_photo
(
id bigint(20) not null comment '自动增长id',
real_name varchar(64) not null comment '真是姓名',
front_side_path varchar(64) not null comment '身份证正面',
back_side_path varchar(64) not null comment '身份证背面',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

create table company_stock_holder
(
id bigint(20) not null comment '自动增长id',
real_name varchar(64) not null comment '真实姓名',
id_card varchar(64) not null comment '身份证号',
sub_amount double not null comment '认缴金额',
sub_date datetime not null comment '认缴日期',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

create table fee_info
(
id bigint(20) not null comment '自动增长id',
fee_name varchar(64) not null comment '费用名称',
fee_type int not null comment '费用类型 1-注册 2-地址 3-代理记账 4-开户 5-刻章 6-开票',
data_1 varchar(64) not null comment '扩展字段1',
data_2 varchar(64) not null comment '扩展字段2',
fee double not null comment '费用',
order_no int not null  comment '排序',
status int not null comment '费用科目状态 0-未启用 1--已启用',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;

create table material_info
(
id bigint(20) not null comment '自动增长id',
material_name varchar(64) not null comment '资料名称'
order_no int not null comment '排序',
status int not null comment '资料状态 0-未启用 1--已启用',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;


create table company_material
(
id bigint(20) not null comment '自动增长id',
customer_nick varchar(64) not null comment '客户昵称',
customer_mob  varchar(64) not null comment '客户手机',
companyFullName varchar(512) not null comment '公司全名',
num int not null comment '资料数量',
content varchar(128) not null comment '资料内容',
from_staff_type varchar(64) not null comment '员工类型',
from_staff_name varchar(64) not null comment '员工名称',
to_staff_type varchar(64) not null comment '员工类型',
to_staff_name varchar(64) not null comment '员工名称',
memo varchar(64) not null comment '员工备注',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;



create table company_material_history
(
id bigint(20) not null comment '自动增长id',
customer_nick varchar(64) not null comment '客户昵称',
customer_mob  varchar(64) not null comment '客户手机',
companyFullName varchar(512) not null comment '公司全名',
num int not null comment '资料数量',
content varchar(128) not null comment '资料内容',
from_staff_type varchar(64) not null comment '员工类型',
from_staff_name varchar(64) not null comment '员工名称',
to_staff_type varchar(64) not null comment '员工类型',
to_staff_name varchar(64) not null comment '员工名称',
memo varchar(64) not null comment '员工备注',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;


create table company_seal
(
id bigint(20) not null comment '自动增长id',
contact_name varchar(64) not null comment '联系人',
contact_mob  varchar(64) not null comment '联系手机',
company_full_name varchar(256) not null comment '公司全名',
id_card_cert_path varchar(512) not null comment '身份证图片',
business_cert_path varchar(512) not null comment '营业执照图片',
commit_date datetime not null comment '提交日期',
commit_user_id bigint(20) not null comment '提交用户id',
begin_date datetime not null comment '开始日期',
end_date datetime not null comment '结束日期',
staff_name varchar(64) not null comment '员工姓名',
staff_type varchar(64) not null comment '员工类型',
content varchar(512) not null comment '刻章内容',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;




create table company_task
(
id bigint(20) not null comment '自动增长id',
task_type int not null comment '注册/变更/核名',
task_name varchar(64) not null comment '工商核名',
task_status int not null comment '任务状态'
begin_date datetime not null comment '开始日期',
end_date datetime not null comment '结束日期',
content varchar(512) not null comment '任务上下文内容',
primary key('id')
)ENGINE=InnoDB DEFAULT CHARSET=utf8;


你可能感兴趣的:(sql)