alter table customer_staff drop column `PASSWORD`; alter table customer_staff drop column FACE_IMG; alter table customer_staff drop column IDENTITY_NO; alter table customer_staff MODIFY COLUMN GENDER int(1) COMMENT '性别0.未知,1男,2.女'; alter table customer_staff add column HEAD_PHOTO varchar(500) COMMENT '头像'; alter table customer_staff add column ACTIVE_FLAG varchar(20) not null COMMENT 'inactive未激活,active已激活'; alter table customer_staff add column ACTIVE_TIME DATETIME COMMENT '激活时间'; alter table customer_staff add column ENABLE_FLAG VARCHAR(20) not null COMMENT '未禁用enable,已禁用disabled'; alter table customer_staff add column WORK_TYPE VARCHAR(20) not null comment 'fulltime专职parttime兼职'; -- --2020-04-18 alter table customer_staff add column CUSTOMER_ID varchar(64) NOT NULL COMMENT '客户Id CUSTOMER.id'; -- --2020-04-18v2 CREATE TABLE `staff_wechat` ( `ID` varchar(64) NOT NULL COMMENT '唯一标识', `USER_ID` varchar(64) NOT NULL COMMENT '用户Id user.id', `WX_OPEN_ID` varchar(64) NOT NULL COMMENT 'openId', `WX_UNION_ID` varchar(64) DEFAULT NULL COMMENT '微信unionId', `MOBILE` varchar(11) DEFAULT NULL COMMENT '手机号', `NICKNAME` varchar(32) DEFAULT NULL COMMENT '昵称', `SEX` int(11) DEFAULT NULL COMMENT '性别', `HEAD_IMG_URL` varchar(1024) DEFAULT NULL COMMENT '头像', `COUNTRY` varchar(32) DEFAULT NULL COMMENT '国家', `PROVINCE` varchar(32) DEFAULT NULL COMMENT '省份', `CITY` varchar(32) DEFAULT NULL COMMENT '城市', `LANGUAGE` varchar(32) DEFAULT NULL COMMENT '语言', `DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', `REVISION` int(11) NOT NULL COMMENT '乐观锁', `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='工作人员微信关系表 '; alter table grid_latest MODIFY COLUMN PID VARCHAR(64) comment'上级组织ID (数据统计字段)'; alter table staff_wechat add column LATEST_LOGIN_TIME datetime NOT NULL COMMENT '最后一次登录时间'; alter table staff_wechat drop column LATEST_LOGIN_TIME; CREATE TABLE `staff_login_history` ( `ID` varchar(64) NOT NULL COMMENT '唯一标识', `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', `STAFF_ID` varchar(64) NOT NULL COMMENT 'customer_staff.userId', WX_OPEN_ID varchar(64) NOT NULL COMMENT '微信openId', `MOBILE` varchar(20) NOT NULL COMMENT '手机号', `ORG_ID` varchar(64) NOT NULL COMMENT '组织机构id', `GRID_ID` varchar(64) COMMENT '网格表Id (CUSTOMER_GRID.id)', `DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', `REVISION` int(11) NOT NULL COMMENT '乐观锁', `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', `CREATED_TIME` datetime NOT NULL COMMENT '创建时间,登录时间', `UPDATED_BY` varchar(32) DEFAULT NULL COMMENT '更新人', `UPDATED_TIME` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`ID`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='工作人员登录日志表';