DROP TABLE IF EXISTS `xiao_e_config`;
-- 小鹅通配置信息
CREATE TABLE `xiao_e_config` (
                                 `xiao_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '小鹅通id',
                                 `app_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'AppId',
                                 `qy_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'qyId',
                                 `client_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'clientId',
                                 `secret_key` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'secret_key',
                                 `grant_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'grant_type',
                                 PRIMARY KEY (`xiao_id`)
) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT='小鹅通配置表';



DROP TABLE if exists `xiao_signin_code`;
CREATE TABLE `xiao_signin_code`(
                                   `id` varchar(64) NOT NULL COMMENT '签到码id',
                                   `user_id` varchar(64) NULL DEFAULT NULL COMMENT '负责人id',
                                   `zb_id` varchar(64)  NOT NULL COMMENT '直播id',
                                   `sku_id` varchar(64)  NOT NULL COMMENT '商品规格id',
                                   `emple_code_id` varchar(64) NOT NULL COMMENT '员工活码id',
                                   `courseware_id` varchar(64) NULL DEFAULT NULL COMMENT '课件id',
                                   `zb_name` varchar(64) NULL DEFAULT NULL COMMENT '直播名称',
                                   `signin_code` varchar(64) NULL DEFAULT NULL COMMENT '签到码url',
                                   `signin_name` varchar(64) NULL DEFAULT NULL COMMENT '签到码名称',
                                   `region` varchar(64) NULL DEFAULT NULL COMMENT '所属区域',
                                   `user_name` varchar(32) NULL DEFAULT NULL COMMENT '负责人姓名',
                                   `emple_user_name` varchar(32) NULL DEFAULT NULL COMMENT '负责人姓名',
                                   `name` varchar(64) NULL DEFAULT NULL COMMENT '活动名称',
                                   `training_time` datetime(0) DEFAULT  NULL COMMENT '培训时间',
                                   `end_time` datetime(0) DEFAULT  NULL COMMENT '结束时间',
                                   `begin_time` datetime(0) DEFAULT  NULL COMMENT '签到码有效期起',
                                   `period_time` datetime(0) DEFAULT  NULL COMMENT '签到码有效期止',
                                   `create_time`   datetime(0) DEFAULT  NULL COMMENT '创建时间',
                                   `update_time`   datetime(0) DEFAULT  NULL COMMENT '更新时间',
                                   `signin_num` varchar(64) NULL DEFAULT NULL COMMENT '签到数',
                                   `friend_nun` varchar(64) NULL DEFAULT NULL COMMENT '添加好友数',
                                   `signin_type` char(1) NULL DEFAULT NULL COMMENT '签到类型',
                                   `signin_process` char(1) NULL DEFAULT NULL COMMENT '签到流程',
                                   `emple_url_img` varchar(255) NULL DEFAULT NULL COMMENT '员工活吗链接',
                                   `remark` varchar(64) NULL DEFAULT NULL COMMENT '说明',
                                   PRIMARY KEY (`id`) USING BTREE
)ENGINE = InnoDB AUTO_INCREMENT = 103 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '签到码信息详情' ROW_FORMAT = Dynamic;


ALTER TABLE xiao_signin_code ADD COLUMN training_address varchar(64) DEFAULT NULL COMMENT '年龄';

