package cn.iocoder.yudao.module.knowledge.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 cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.knowledge.controller.requestdto.Stemdto;
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.io.Serializable;
import java.time.LocalDate;
import java.util.List;


@Data
@TableName(value = "t_test_paper_info",autoResultMap = true)
@Schema(description = "试卷信息类")
public class TTestPaperInfo extends BaseDO implements Serializable {

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

    @Schema(description = "考试编号", example = "123")
    private String testNum;

    @Schema(description = "试卷名称", example = "数学试卷")
    private String name;

    @Schema(description = "考试开始日期", example = "123")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private LocalDate startDate;

    @Schema(description = "考试截止日期", example = "123")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private LocalDate endDate;

    @Schema(description = "考试时长", example = "123")
    private Integer duration;

    @Schema(description = "考试人数", example = "123")
    private Integer peopleCount;

    @Schema(description = "题库名称", example = "一号题库")
    private String questionBankName;

    @Schema(description = "题库id", example = "1")
    private Long questionBankId;

    @Schema(description = "试卷类型 0:统一试卷 1:千人千份", example = "0")
    private String type;

    @Schema(description = "总分", example = "100")
    private Double allScore;

    @Schema(description = "及格分", example = "20")
    private Double passScore;

    @Schema(description = "补考次数", example = "1")
    private Integer makeUp;

    @Schema(description = "纠错次数", example = "2")
    private Integer errorCorrection;

    @Schema(description = "总题数", example = "10")
    private Integer allQuestionSum;

    @Schema(description = "培训编码", example = "dsdssKDSDFDS0DSC2")
    private String teachCode;

    @Schema(description = "各题字段(题设置)", example = "de")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<Stemdto> setting;

    @Schema(description = "培训id", example = "123")
    private Long trainId;

    @TableField(exist = false)
    @Schema(description = "考试状态", example = "未开始")
    private String testStatus;





}
