mysql变更格式
数据库:wiki
表名:tb_analysis_wiki_count_data 、 tb_analysis_wiki_detail_data
use wiki;
-- auto-generated definition
create table tb_analysis_wiki_count_data
(
id int auto_increment
primary key,
agent varchar(500) default '' not null
comment '代理商渠道',
area varchar(20) default '' not null
comment '所属大区',
passed int default '0' not null
comment '合格数',
failed int default '0' not null
comment '不合格数',
pass_rate decimal(4, 2) default '0.00' not null
comment '合格率',
status tinyint(1) default '1' null
comment '状态,1有效',
operation varchar(50) default '' not null
comment '操作人员',
create_time datetime default CURRENT_TIMESTAMP not null,
last_update_time timestamp default CURRENT_TIMESTAMP not null
on update CURRENT_TIMESTAMP
)
comment '百科用户填写完整度统计表';
create index tb_analysis_wiki_count_data_cagent
on tb_analysis_wiki_count_data (agent);
-- auto-generated definition
create table tb_analysis_wiki_detail_data
(
id int auto_increment
primary key,
company_name_digest varchar(32) default '' not null
comment 'digest',
user_id int not null
comment '用户ID,方便快捷登陆使用',
company_name varchar(255) default '' not null
comment '公司名',
logo_img tinyint(1) default '0' not null
comment 'logo是否填写,1未填写,2填写未通过,3填写通过',
contact_phone tinyint(1) default '0' not null
comment '电话是否填写,1未填写,2填写未通过,3填写通过',
contact_email tinyint(1) default '0' not null
comment '邮箱是否填写,1未填写,2填写未通过,3填写通过',
intro tinyint(1) default '0' not null
comment '企业简介是否填写,1未填写,2填写未通过,3填写通过',
official_website tinyint(1) default '0' not null
comment '企业网址是否填写,1未填写,2填写未通过,3填写通过',
company_notice tinyint(1) default '0' not null
comment '企业公告是否填写,1未填写,2填写未通过,3填写通过',
public_img tinyint(1) default '0' not null
comment '企业公众号是否填写,1未填写,2填写未通过,3填写通过',
content tinyint(1) default '0' not null
comment '百科自定义内容是否填写,1未填写,2填写未通过,3填写通过',
fast_contact tinyint(1) default '0' not null
comment '极速联系人是否填写,1未填写,2填写未通过,3填写通过',
short_word tinyint(1) default '0' not null
comment '短词是否填写,1未填写,2填写未通过,3填写通过',
exclusive_domain tinyint(1) default '0' not null
comment '专属域名是否填写,1未填写,2填写未通过,3填写通过',
qualification tinyint(1) default '0' not null
comment '资质核验是否填写,1未填写,2填写未通过,3填写通过',
online tinyint(1) default '0' not null
comment '在线客服是否填写,1未填写,2填写未通过,3填写通过',
address_tag tinyint(1) default '0' not null
comment '地址标记是否填写,1未填写,2填写未通过,3填写通过',
level tinyint(1) default '0' not null
comment '百科版本,1是低级版,2是高级版',
agent varchar(500) default '' not null
comment '代理商渠道',
status tinyint(1) default '1' null
comment '状态,1有效',
else_reason text null
comment '14种未通过理由,json保存',
operation varchar(50) default '' not null
comment '操作人员',
create_time datetime default CURRENT_TIMESTAMP not null,
last_update_time timestamp default CURRENT_TIMESTAMP not null
on update CURRENT_TIMESTAMP,
is_pass tinyint(1) default '0' not null
comment '1表示不合格,2表示合格'
)
comment '百科用户填写完整度统计明细表';
create index tb_analysis_wiki_detail_data_cagent
on tb_analysis_wiki_detail_data (agent);
create index tb_analysis_wiki_detail_data_cname
on tb_analysis_wiki_detail_data (company_name);
create index tb_analysis_wiki_detail_data_digest
on tb_analysis_wiki_detail_data (company_name_digest);