package org.jeecg.modules.adweb.gpt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

/**
 * @Description: ChatGPT聊天历史记录表
 * @Author: jeecg-boot
 * @Date: 2025-01-07
 * @Version: V1.0
 */
@Data
@TableName("adweb_ai_chat_history")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description = "ChatGPT聊天历史记录表")
public class ChatHistory implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private String id;

    /** 用户ID,与用户表关联 */
    @Excel(name = "用户ID,与用户表关联", width = 15)
    @Schema(description = "用户ID,与用户表关联")
    private String uid;

    /** 对话时间，如每周或每月第一天 */
    @Excel(name = "对话时间，如每周或每月第一天", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Schema(description = "对话时间，如每周或每月第一天")
    private LocalDate date;

    /** 内容 */
    @Excel(name = "内容", width = 15)
    @Schema(description = "内容")
    private String content;

    /** 创建时间 */
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间")
    private java.util.Date ctime;

    /** 修改时间 */
    @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "修改时间")
    private java.util.Date utime;
}
