Files
liche/sql/receiver/clue.sql
T
2021-07-22 18:14:25 +08:00

46 lines
2.7 KiB
SQL

-- ----------------------------
-- Title:线索池
-- Author:lcc
-- Table:lc_receiver_clues
-- ---------------------------
drop table if exists lc_receiver_clues;
create table `lc_receiver_clues` (
`id` int(10) not null auto_increment comment '自增id',
`name` varchar(32) not null comment '客户姓名',
`mobile` varchar(11) not null comment '客户手机号码',
`brand_id` int(10) not null default '0' comment '车型品牌id',
`s_id` int(10) not null default '0' comment '车系id',
`if_driver` tinyint(4) not null default '0' comment '是否试驾(0否 1是)',
`admin_id` int(10) not null default '0' comment '销售id',
`app_id` int(10) unsigned not null default '0' comment '来源小程序id',
`cf_id` int(10) not null default '0' comment '来源id',
`out_id` int(10) not null default '0' comment '外部来源id',
`cf_uid` int(10) not null default '0' comment '来源用户id',
`cf_platform` varchar(20) not null default '' comment '来源平台',
`jsondata` json default null comment '其它信息',
`status` tinyint(1) not null default '0' comment '状态',
`status_id` int(10) not null default '1',
`u_time` timestamp not null default current_timestamp on update current_timestamp,
`c_time` int(10) unsigned not null default '0' comment '创建时间',
primary key (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='线索池';
-- ----------------------------
-- Title:线索操作日志表
-- Author:lcc
-- Table:lc_receiver_clue_oplogs
-- ---------------------------
drop table if exists lc_receiver_clue_oplogs;
create table `lc_receiver_clue_oplogs` (
`id` int(10) unsigned not null auto_increment comment '自增id',
`clue_id` int(10) unsigned not null comment '线索id',
`uid` int(10) unsigned not null comment '操作用户id',
`uname` varchar(32) not null default '' comment '操作用户名',
`type` tinyint(1) not null default '0' comment '类型',
`log` varchar(256) not null default '' comment '操作内容',
`c_time` int(10) unsigned not null default '0' comment '创建时间',
`u_time` timestamp not null default current_timestamp on update current_timestamp,
primary key (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='线索操作日志表';