package cn.iocoder.yudao.module.knowledge.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


/**
 * 试卷答题卡表
 *
 * @author admin
 * @since 1.0.0 2024-04-26
 */

@Data
@TableName(value = "t_test_paper_answer_sheet", autoResultMap = true)
public class TTestPaperAnswerSheet extends BaseDO {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 试卷信息id
     */
    private Long testPaperInfoId;

    /**
     * 得分
     */
    private Double score;

    /**
     * 提交答案
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private SubmitAnswer submitAnswer;

    /**
     * 考生编号
     */
    private String examinationNumber;
    /**
     * 考生名称
     */
    private String examinationName;

    /**
     * 开始考试时间
     */
    private Date startTime;
    /**
     * 是否补考 0不是
     */
    private Integer type;
    /**
     * 是否通过
     */
    private Integer pass;
    /**
     * 纠错次数
     */
    private Integer redress;
    /**
     * 纠错次数
     */
    @TableField(exist = false)
    private String deptName;
    private Long userId;
    @TableField(
            fill = FieldFill.INSERT
    )
    private String identityId;

    @Schema(description = "是否是交卷", example = "1")
    private String isHand;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
    private Date startDate;

    //试卷名称
    @TableField(exist = false)
    private String paperName;
}
