package com.ai.da.mapper.primary.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("chat_message")
public class ChatMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "项目ID")
    private Long projectId;

    @Schema(description = "角色system/user")
    private String role;

    @Schema(description = "排序")
    private Integer seq;

    @Schema(description = "内容")
    private String content;

    @Schema(description = "用户ID")
    private Long accountId;

    @Schema(description = "0对话内容1颜色2图片")
    private Integer isImage;
    /**
     * 输入
     */
    private Long inputTokens;
    /**
     * 输出
     */
    private Long outputTokens;
    /**
     * 思考
     */
    private Long reasoningTokens;
    /**
     * 本次输出消耗的总金额
     */
    private String totalCost;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;
}
