package top.tqx.demo_1.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "question", autoResultMap = true)
public class Question implements Serializable {

    private static final long serialVersionUID = 1L;

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

    private String questionId;

    private String questionType;

    private Integer difficulty;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private JsonNode tags;

    private BigDecimal score;

    private String version;

    private String documentId;

    private String documentName;

    private String knowledgeBasePath;

    private String sourceContext;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private JsonNode chunkIds;

    private Integer sourceChunksUsed;

    private Integer examCount;

    private Integer correctCount;

    private LocalDateTime lastExamTime;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private JsonNode pageNumbers;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private JsonNode content;

    private String status;

    private String reviewerComment;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;

}
