package com.sundot.airport.exam.dto;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <b>功能名：</b>DailyTaskConfigDTO<br>
 * <b>说明：</b> 每日答题任务配置DTO <br>
 * <b>著作权：</b> Copyright (C) 2025 SUNDOT CORPORATION<br>
 * <b>修改履历：
 *
 * @author Simon Lin
 */
public class DailyTaskConfigDTO {

    /**
     * 业务主键（修改时需要）
     */
    private String dtcId;

    /**
     * 配置名称
     */
    @NotBlank(message = "配置名称不能为空")
    private String dtcName;

    /**
     * 适用角色ID列表（对应sys_role表的role_id）
     */
    @NotNull(message = "适用角色不能为空")
    private List<Long> dtcRoles;

    /**
     * 适用部门ID列表
     */
    @NotNull(message = "适用部门不能为空")
    private List<Long> dtcDeptIds;

    /**
     * 每日套数
     */
    @NotNull(message = "每日套数不能为空")
    @Min(value = 1, message = "每日套数至少为1")
    private Integer dtcDailySets;

    /**
     * 每套题量
     */
    @NotNull(message = "每套题量不能为空")
    @Min(value = 3, message = "每套题量至少为3")
    private Integer dtcQuestionsPerSet;

    /**
     * 答题时间限制（秒）
     */
    @NotNull(message = "答题时间限制不能为空")
    @Min(value = 60, message = "答题时间至少为60秒")
    private Integer dtcTimeLimit;

    /**
     * 总分
     */
    private BigDecimal dtcTotalScore = new BigDecimal("100.00");

    /**
     * 启用状态（0停用 1启用）
     */
    private Boolean dtcEnableStatus = true;

    /**
     * 生效开始日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date dtcStartDate;

    /**
     * 生效结束日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date dtcEndDate;

    /**
     * 备注
     */
    private String remark;

    // Getters and Setters

    public String getDtcId() {
        return dtcId;
    }

    public void setDtcId(String dtcId) {
        this.dtcId = dtcId;
    }

    public String getDtcName() {
        return dtcName;
    }

    public void setDtcName(String dtcName) {
        this.dtcName = dtcName;
    }

    public List<Long> getDtcRoles() {
        return dtcRoles;
    }

    public void setDtcRoles(List<Long> dtcRoles) {
        this.dtcRoles = dtcRoles;
    }

    public List<Long> getDtcDeptIds() {
        return dtcDeptIds;
    }

    public void setDtcDeptIds(List<Long> dtcDeptIds) {
        this.dtcDeptIds = dtcDeptIds;
    }

    public Integer getDtcDailySets() {
        return dtcDailySets;
    }

    public void setDtcDailySets(Integer dtcDailySets) {
        this.dtcDailySets = dtcDailySets;
    }

    public Integer getDtcQuestionsPerSet() {
        return dtcQuestionsPerSet;
    }

    public void setDtcQuestionsPerSet(Integer dtcQuestionsPerSet) {
        this.dtcQuestionsPerSet = dtcQuestionsPerSet;
    }

    public Integer getDtcTimeLimit() {
        return dtcTimeLimit;
    }

    public void setDtcTimeLimit(Integer dtcTimeLimit) {
        this.dtcTimeLimit = dtcTimeLimit;
    }

    public BigDecimal getDtcTotalScore() {
        return dtcTotalScore;
    }

    public void setDtcTotalScore(BigDecimal dtcTotalScore) {
        this.dtcTotalScore = dtcTotalScore;
    }

    public Boolean getDtcEnableStatus() {
        return dtcEnableStatus;
    }

    public void setDtcEnableStatus(Boolean dtcEnableStatus) {
        this.dtcEnableStatus = dtcEnableStatus;
    }

    public Date getDtcStartDate() {
        return dtcStartDate;
    }

    public void setDtcStartDate(Date dtcStartDate) {
        this.dtcStartDate = dtcStartDate;
    }

    public Date getDtcEndDate() {
        return dtcEndDate;
    }

    public void setDtcEndDate(Date dtcEndDate) {
        this.dtcEndDate = dtcEndDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
