CREATE TABLE IF NOT EXISTS `aitasklog`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `uid` bigint(11) NULL DEFAULT NULL COMMENT '用户ID',
  `taskId` varchar(50) NULL DEFAULT NULL COMMENT '任务ID',
  `status` int(20) NULL DEFAULT NULL COMMENT '0进行中,1成功,2失败',
  `taskType` int(20) NULL DEFAULT NULL COMMENT '任务类型',
  `message` varchar(255) NULL DEFAULT NULL COMMENT '返回成功或失败信息',
  `result` mediumtext NULL COMMENT '返回结果',
  `addUserName` varchar(255) NULL DEFAULT NULL COMMENT '用户名',
  `addTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间',
  `source` mediumtext NULL COMMENT '请求数据',
  `sensitiveWord` varchar(255) NULL DEFAULT NULL COMMENT '敏感词',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;


CREATE TABLE IF NOT EXISTS `member_activelog`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `uid` bigint(20) NOT NULL COMMENT '用户id',
  `activeTime` date NOT NULL COMMENT '活跃时间（以天为单位）',
  `count` int(11) NULL DEFAULT NULL COMMENT '当天活跃次数',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_uid`(`uid`) USING BTREE,
  INDEX `idx_time`(`activeTime`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

ALTER TABLE `member_attention` ADD `mutual` int(1) NULL DEFAULT 0 COMMENT '是否互关；1：是；0：否';

CREATE TABLE IF NOT EXISTS `member_interior`  (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `uid` bigint(11) NULL DEFAULT NULL,
  `mobile` varchar(32) NULL DEFAULT NULL COMMENT '员工手机号',
  `firm` varchar(20) NULL DEFAULT NULL COMMENT '公司名称',
  `empName` varchar(20) NULL DEFAULT NULL COMMENT '员工姓名',
  `bankCard` varchar(20) NULL DEFAULT NULL COMMENT '银行卡号',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `mobile`(`mobile`) USING BTREE,
  UNIQUE INDEX `uid`(`uid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

ALTER TABLE `member_invitationlog` ADD `equipmentid` varchar(50) NULL DEFAULT NULL COMMENT '设备id';
ALTER TABLE `member_invitationlog` ADD `macAddress` varchar(50) NULL DEFAULT NULL COMMENT 'mac地址';
ALTER TABLE `member_invitationlog` ADD INDEX `idx_inviterID`(`inviterID`) USING BTREE;

ALTER TABLE `member_member` ADD `m_uid` bigint(11) NULL DEFAULT NULL;
ALTER TABLE `member_member` ADD `userType` int(1) NULL DEFAULT 1 COMMENT '用户类型；1：普通用户；2：融媒号用户；';
ALTER TABLE `member_member` ADD `authorInfo` varchar(500) NULL DEFAULT NULL COMMENT '融媒号用户信息，Json字符串';
ALTER TABLE `member_member` ADD `idName` varchar(50) NULL DEFAULT NULL COMMENT '身份证-姓名';
ALTER TABLE `member_member` ADD `idCard` varchar(50) NULL DEFAULT NULL COMMENT '省份证-号';
ALTER TABLE `member_member` ADD UNIQUE INDEX `mobile`(`mobile`) USING BTREE;
ALTER TABLE `member_member` ADD UNIQUE INDEX `m_uid`(`m_uid`) USING BTREE;
ALTER TABLE `member_member` ADD INDEX `idx_nickname`(`nickName`(50)) USING BTREE;

ALTER TABLE `member_member_party` ADD INDEX `idx_mobilephone`(`mobilephone`) USING BTREE;

ALTER TABLE `member_orders` ADD `extend` text NULL COMMENT '京东蓝海豚订单信息';

ALTER TABLE `member_org` ADD `groupName` varchar(225) NULL DEFAULT NULL COMMENT '会员组织名称';

CREATE TABLE IF NOT EXISTS `member_ottversion` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `userid` bigint(11) NOT NULL COMMENT '深圳OTTmember_member用户id',
  `initversion` varchar(32) NULL DEFAULT NULL COMMENT '深圳OTT初始化版本号',
  `currentversion` varchar(32) NULL DEFAULT NULL COMMENT '深圳OTT当前版本号',
  `gmt_create` datetime(0) NOT NULL COMMENT '行创建时间',
  `gmt_modified` datetime(0) NOT NULL COMMENT '行修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

ALTER TABLE `member_setting` ADD `jscnAli` text NULL COMMENT '江苏有线支付宝支付相关配置';
ALTER TABLE `member_setting` ADD `jscnWechart` text NULL COMMENT '江苏有线微信支付相关配置';
ALTER TABLE `member_setting` ADD `jscnJdjli` text NULL COMMENT '江苏有线蓝海豚相关配置';
ALTER TABLE `member_setting` ADD `codeUrl` varchar(255) NULL DEFAULT NULL COMMENT '下载二维码地址';
ALTER TABLE `member_setting` ADD `jsAttenton` text NULL COMMENT '江苏虚拟粉丝配置';

CREATE TABLE IF NOT EXISTS`member_stb`  (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL COMMENT '用户id',
  `STBCode` varchar(32) NOT NULL COMMENT '机顶盒标识',
  `regtime` bigint(11) NOT NULL COMMENT '绑定时间',
  `clubCard` varchar(32) NULL DEFAULT NULL COMMENT '客户证号(充值查账使用)',
  `administrator` int(1) NOT NULL DEFAULT 0 COMMENT '是否为管理员(0，不是；1，是)',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uidAndSTBCode`(`uid`, `STBCode`) USING BTREE,
  INDEX `uid`(`uid`) USING BTREE,
  INDEX `STBCode`(`STBCode`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;
