-- ----------------------------
-- Table structure for fs_user_course_complaint_record
-- ----------------------------
DROP TABLE IF EXISTS `fs_user_course_complaint_record`;
CREATE TABLE `fs_user_course_complaint_record`  (
                                                    `record_id` bigint NOT NULL AUTO_INCREMENT COMMENT '投诉记录id',
                                                    `user_id` bigint NULL DEFAULT NULL COMMENT '用户id，关联fs_user',
                                                    `complaint_type_id` bigint NULL DEFAULT NULL COMMENT '投诉类型id',
                                                    `complaint_content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '投诉内容',
                                                    `course_id` bigint NULL DEFAULT NULL COMMENT '课程id',
                                                    `video_id` bigint NULL DEFAULT NULL COMMENT '视频小节id',
                                                    `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                                                    PRIMARY KEY (`record_id`) USING BTREE,
                                                    INDEX `user_id_index`(`user_id` ASC) USING BTREE,
                                                    INDEX `complaint_type_id_index`(`complaint_type_id` ASC) USING BTREE,
                                                    INDEX `course_id_index`(`course_id` ASC) USING BTREE,
                                                    INDEX `video_id_index`(`video_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '看课投诉记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for fs_user_course_complaint_type
-- ----------------------------
DROP TABLE IF EXISTS `fs_user_course_complaint_type`;
CREATE TABLE `fs_user_course_complaint_type`  (
                                                  `complaint_type_id` bigint NOT NULL AUTO_INCREMENT COMMENT '投诉类型id',
                                                  `parent_id` bigint NULL DEFAULT NULL COMMENT '父id，关联主键id',
                                                  `complaint_type_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '投诉类型名称',
                                                  `type_level` int NULL DEFAULT NULL COMMENT '级别（目前只有两级）',
                                                  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
                                                  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
                                                  PRIMARY KEY (`complaint_type_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '看课投诉类型表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
