create table chat_info
(
    id           bigint auto_increment
        primary key,
    ssid         varchar(64)   not null comment 'ssid',
    type         varchar(32)   not null comment '类型',
    chat_id      varchar(64)   null comment '对话id，用于关联上下文',
    role         varchar(32)   null comment '角色 user：用户 assistant：AI',
    content      varchar(3000) null comment '用户问题',
    content_json json          null comment '回复内容',
    status       int           null comment '状态',
    create_time  datetime      null comment '创建时间'
);

create index idx_chat_id
    on chat_info (chat_id);

create index idx_create_time
    on chat_info (create_time);

create index idx_ssid
    on chat_info (ssid);

create index idx_type
    on chat_info (type);