package org.xyzh.common.dto.ai;

import org.xyzh.common.dto.BaseDTO;

/**
 * @description 对话消息表
 * @filename TbAiMessage.java
 * @author yslg
 * @copyright xyzh
 * @since 2025-10-15
 */
public class TbAiMessage extends BaseDTO {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * @description 会话ID
     */
    private String conversationID;
    
    /**
     * @description 用户ID
     */
    private String userID;
    
    /**
     * @description 角色（user用户 assistant助手 system系统）
     */
    private String role;

    private String agentID;
    
    /**
     * @description 消息内容
     */
    private String content;
    
    /**
     * @description 关联文件ID（JSON数组）
     */
    private String fileIDs;
    
    /**
     * @description 引用知识ID（JSON数组）
     */
    private String knowledgeIDs;
    
    /**
     * @description 知识库引用详情（JSON数组，包含title/snippet/score）
     */
    private String knowledgeRefs;
    
    /**
     * @description Token数量
     */
    private Integer tokenCount;
    
    /**
     * @description Dify消息ID
     */
    private String difyMessageId;

    /**
     * @description 用户评分（1=好评，-1=差评，0=取消评价）
     */
    private Integer rating;

    /**
     * @description 用户反馈内容
     */
    private String feedback;

    public String getConversationID() {
        return conversationID;
    }

    public void setConversationID(String conversationID) {
        this.conversationID = conversationID;
    }

    public String getUserID() {
        return userID;
    }

    public void setUserID(String userID) {
        this.userID = userID;
    }

    public String getAgentID() {
        return agentID;
    }

    public void setAgentID(String agentID) {
        this.agentID = agentID;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getFileIDs() {
        return fileIDs;
    }

    public void setFileIDs(String fileIDs) {
        this.fileIDs = fileIDs;
    }

    public String getKnowledgeIDs() {
        return knowledgeIDs;
    }

    public void setKnowledgeIDs(String knowledgeIDs) {
        this.knowledgeIDs = knowledgeIDs;
    }

    public String getKnowledgeRefs() {
        return knowledgeRefs;
    }

    public void setKnowledgeRefs(String knowledgeRefs) {
        this.knowledgeRefs = knowledgeRefs;
    }

    public Integer getTokenCount() {
        return tokenCount;
    }

    public void setTokenCount(Integer tokenCount) {
        this.tokenCount = tokenCount;
    }

    public String getDifyMessageId() {
        return difyMessageId;
    }

    public void setDifyMessageId(String difyMessageId) {
        this.difyMessageId = difyMessageId;
    }

    public Integer getRating() {
        return rating;
    }

    public void setRating(Integer rating) {
        this.rating = rating;
    }

    public String getFeedback() {
        return feedback;
    }

    public void setFeedback(String feedback) {
        this.feedback = feedback;
    }

    @Override
    public String toString() {
        return "TbAiMessage{" +
                "id=" + getID() +
                ", conversationID='" + conversationID + '\'' +
                ", userID='" + userID + '\'' +
                ", role='" + role + '\'' +
                ", tokenCount=" + tokenCount +
                ", createTime=" + getCreateTime() +
                '}';
    }
}
