package com.custom.webui.entity;
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
import lombok.Data;
|
|
import java.time.LocalDateTime;
|
|
/**
|
* 会话实体,对应表 {@code chat},即侧边栏中的一个对话。
|
*/
|
@Data
|
@TableName("chat")
|
public class Chat {
|
|
@TableId(type = IdType.AUTO)
|
private Long id;
|
|
/** 所属用户 id,所有查询必须带上该条件做数据隔离 */
|
private Long userId;
|
|
private String title;
|
|
/**
|
* 模型参数 JSON 字符串,MySQL 中列为 json 类型。
|
* 结构见 {@link com.custom.webui.dto.req.ChatMetaRequest}:
|
* {@code {temperature, topP, systemPrompt, modelName}}
|
*/
|
private String meta;
|
|
private LocalDateTime createdAt;
|
|
private LocalDateTime updatedAt;
|
}
|