package cn.iocoder.yudao.module.knowledge.controller.requestdto;

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.FastjsonTypeHandler;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.module.knowledge.entity.TTrainUser;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.List;


/**
 * 试卷信息表查询
 *
 * @author admin
 * @since 1.0.0 2024-04-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "试卷信息表查询")
@TableName(autoResultMap = true)
public class TTestPaperInfoRequest extends PageParam {

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

    @Schema(description = "试卷id")
    private Long paperId;

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

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

    @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 = "123")
    private Integer duration;
    @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 = "1515")
    private String content;

    /*@Schema(
            description = "各题字段(题设置)",
            example = "de"
    )
    private String setting;*/

    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<Stemdto> setting;

    @Schema(description = "培训人员列表")
    private List<TTrainUser> trainUser;

    @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;

    private List<Long> trainIdList;
    private String identityId;
    private String canEdit;
}
