package cn.reghao.tnb.content.app.exam.model.dto;

import cn.reghao.tnb.content.app.exam.model.po.PaperQuestion;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.util.Date;
import java.util.List;

/**
 * @author reghao
 * @date 2024-08-27 17:42:05
 */
@Setter
@Getter
public class PaperAddDto {
    @NotBlank
    private String examName;
    private String examDesc;
    @Size(min = 1, max = 100, message = "一套试卷中的试题不能超过 100 道")
    private List<PaperQuestion> paperQuestions;
    @NotNull
    private Integer passScore;
    @NotNull
    private Integer totalScore;
    @NotNull
    private Integer examDuration;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull
    private Date startTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull
    private Date endTime;
    private String examPassword;
}
