CREATE TABLE `teacher_chat_logs`
(
    `id`            int      NOT NULL AUTO_INCREMENT,
    `user_id`       int      NOT NULL COMMENT '用户ID',
    `user_question` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NOT NULL COMMENT '用户提问',
    `model_answer`  longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NOT NULL COMMENT '模型回答',
    `deleted`       tinyint(1) NOT NULL COMMENT '逻辑删除标记(0-正常,1-已删除)',
    `create_time`   datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_time`   datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
    `create_by`     varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '创建人',
    `update_by`     varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '修改人',
    `tenant_id`     varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_german2_ci NULL DEFAULT NULL COMMENT '租户id',
    PRIMARY KEY (`id`) USING BTREE,
    INDEX           `idx_user_id`(`user_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_german2_ci ROW_FORMAT = DYNAMIC;

SET
FOREIGN_KEY_CHECKS = 1;