这是上游mysql的:
CREATE TABLE zq_leads
(
id
int(11) NOT NULL AUTO_INCREMENT COMMENT ‘自增主键id’,
sys_id
varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’ COMMENT ‘scrm系统id’,
name
varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’ COMMENT ‘线索名称’,
member_id
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘会员id’,
sales_user_id
varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’ COMMENT ‘企业微信外部联系人id’,
type
tinyint(3) NOT NULL DEFAULT ‘0’ COMMENT ‘线索类型(1.模块内部创建 2.scrm会员推送 3.明师定制BOSS系统推送 11.接口创建)’,
source_type
tinyint(3) NOT NULL DEFAULT ‘0’ COMMENT ‘线索来源类型(1.zq_leads_source表id),2.外部来源(string))’,
source
varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’ COMMENT ‘线索来源’,
source_pid
int(10) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘线索一级来源’,
status
tinyint(3) NOT NULL DEFAULT ‘0’ COMMENT ‘当前线索挖掘状态(-1.删除,0.禁用(关闭),1.正常(未分派),2.跟进中,3.丢单,4.成单,5.释放,6.已分派)’,
group_id
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘用户组id’,
assignment_uid
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘分配人员id’,
assignment_time
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘分配时间’,
level
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘评级’,
point
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘分值’,
third_party_id
varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’ COMMENT ‘第三方id’,
push_boss_status
tinyint(3) NOT NULL DEFAULT ‘0’ COMMENT ‘明师定制:推送boss状态 1=已推送 0=未推送’,
creator
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘创建者’,
create_time
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘创建时间’,
modifier
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘修改者’,
modify_time
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘修改时间’,
remark
varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’ COMMENT ‘备注’,
extra
varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT ‘’ COMMENT ‘额外信息,依具体情况使用’,
push_status
tinyint(3) NOT NULL DEFAULT ‘0’ COMMENT ‘推送状态 0=未推送 1=推送成功 2=推送失败’,
ikcrm_leadid
int(11) NOT NULL DEFAULT ‘0’,
ikcrm_customerid
int(11) NOT NULL DEFAULT ‘0’,
inviter
varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT ‘’ COMMENT ‘邀请人’,
inviter_dept
varchar(11) CHARACTER SET utf8 NOT NULL DEFAULT ‘’ COMMENT ‘邀请人部门’,
inviter_mobile
varchar(11) CHARACTER SET utf8 NOT NULL DEFAULT ‘’ COMMENT ‘邀请人手机号’,
company_id
int(10) DEFAULT ‘0’ COMMENT ‘线索关联企业ID’,
last_follow_time
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘最后跟进时间’,
next_follow_time
int(11) NOT NULL COMMENT ‘下次跟进时间’,
phase
tinyint(4) NOT NULL DEFAULT ‘1’ COMMENT ‘阶段’,
phase_status
tinyint(4) NOT NULL DEFAULT ‘1’ COMMENT ‘阶段状态’,
phase_uptime
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘阶段修改时间’,
belonger
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘当前归属人’,
belonger_branches
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘所属人部门’,
raw_belonger
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘raw阶段归属人’,
mql_belonger
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘mql阶段归属人’,
raw_belonger_branches
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘raw阶段归属人部门’,
mql_belonger_branches
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘mql阶段归属人部门’,
last_follow_type
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘最后一次跟进方式’,
last_allot_time
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘最后一次分派时间’,
mql_time
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘线索转出时间’,
sql_time
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘线索接收时间’,
PRIMARY KEY (id
),
KEY point
(point
),
KEY third_party_id
(third_party_id
) USING BTREE,
KEY sys_id
(sys_id
,name
,type
,source_type
,source
,status
,creator
,modifier
,group_id
) USING BTREE,
KEY status
(status
,name
,type
,source_type
,source
,creator
,modifier
,sys_id
,group_id
) USING BTREE,
KEY member_id
(member_id
) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12619310 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT=‘销售线索表’;
这是tidb的:
CREATE TABLE zq_leads
(
id
int(11) NOT NULL AUTO_INCREMENT COMMENT ‘自增主键id’,
sys_id
varchar(255) NOT NULL DEFAULT ‘’ COMMENT ‘scrm系统id’,
name
varchar(255) NOT NULL DEFAULT ‘’ COMMENT ‘线索名称’,
member_id
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘会员id’,
sales_user_id
varchar(255) NOT NULL DEFAULT ‘’ COMMENT ‘企业微信外部联系人id’,
type
tinyint(3) NOT NULL DEFAULT ‘0’ COMMENT ‘线索类型(1.模块内部创建 2.scrm会员推送 3.明师定制BOSS系统推送 11.接口创建)’,
source_type
tinyint(3) NOT NULL DEFAULT ‘0’ COMMENT ‘线索来源类型(1.zq_leads_source表id),2.外部来源(string))’,
source
varchar(255) NOT NULL DEFAULT ‘’ COMMENT ‘线索来源’,
source_pid
int(10) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘线索一级来源’,
status
tinyint(3) NOT NULL DEFAULT ‘0’ COMMENT ‘当前线索挖掘状态(-1.删除,0.禁用(关闭),1.正常(未分派),2.跟进中,3.丢单,4.成单,5.释放,6.已分派)’,
group_id
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘用户组id’,
assignment_uid
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘分配人员id’,
assignment_time
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘分配时间’,
level
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘评级’,
point
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘分值’,
third_party_id
varchar(255) NOT NULL DEFAULT ‘’ COMMENT ‘第三方id’,
push_boss_status
tinyint(3) NOT NULL DEFAULT ‘0’ COMMENT ‘明师定制:推送boss状态 1=已推送 0=未推送’,
creator
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘创建者’,
create_time
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘创建时间’,
modifier
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘修改者’,
modify_time
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘修改时间’,
remark
varchar(255) NOT NULL DEFAULT ‘’ COMMENT ‘备注’,
extra
varchar(1000) NOT NULL DEFAULT ‘’ COMMENT ‘额外信息,依具体情况使用’,
push_status
tinyint(3) NOT NULL DEFAULT ‘0’ COMMENT ‘推送状态 0=未推送 1=推送成功 2=推送失败’,
ikcrm_leadid
int(11) NOT NULL DEFAULT ‘0’,
ikcrm_customerid
int(11) NOT NULL DEFAULT ‘0’,
inviter
varchar(255) NOT NULL DEFAULT ‘’ COMMENT ‘邀请人’,
inviter_dept
varchar(11) NOT NULL DEFAULT ‘’ COMMENT ‘邀请人部门’,
inviter_mobile
varchar(11) NOT NULL DEFAULT ‘’ COMMENT ‘邀请人手机号’,
company_id
int(10) DEFAULT ‘0’ COMMENT ‘线索关联企业ID’,
last_follow_time
int(11) unsigned NOT NULL DEFAULT ‘0’ COMMENT ‘最后跟进时间’,
next_follow_time
int(11) NOT NULL COMMENT ‘下次跟进时间’,
phase
tinyint(4) NOT NULL DEFAULT ‘1’ COMMENT ‘阶段’,
phase_status
tinyint(4) NOT NULL DEFAULT ‘1’ COMMENT ‘阶段状态’,
phase_uptime
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘阶段修改时间’,
belonger
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘当前归属人’,
belonger_branches
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘所属人部门’,
raw_belonger
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘raw阶段归属人’,
mql_belonger
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘mql阶段归属人’,
raw_belonger_branches
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘raw阶段归属人部门’,
mql_belonger_branches
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘mql阶段归属人部门’,
last_follow_type
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘最后一次跟进方式’,
last_allot_time
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘最后一次分派时间’,
mql_time
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘线索转出时间’,
sql_time
int(11) NOT NULL DEFAULT ‘0’ COMMENT ‘线索接收时间’,
PRIMARY KEY (id
) /*T![clustered_index] CLUSTERED */,
KEY point
(point
),
KEY third_party_id
(third_party_id
),
KEY sys_id
(sys_id
,name
,type
,source_type
,source
,status
,creator
,modifier
,group_id
),
KEY status
(status
,name
,type
,source_type
,source
,creator
,modifier
,sys_id
,group_id
),
KEY member_id
(member_id
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=12649174 COMMENT=‘销售线索表’;