package com.sundot.airport.exam.domain;

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.fasterxml.jackson.annotation.JsonFormat;
import com.sundot.airport.exam.common.model.BaseEntity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <b>功能名：</b>DailyTask<br>
 * <b>说明：</b> 每日答题任务表 <br>
 * <b>著作权：</b> Copyright (C) 2025 SUNDOT CORPORATION<br>
 * <b>修改履历：
 *
 * @author Simon Lin
 */
@TableName("edu_cs_daily_task")
public class DailyTask extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

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

    /**
     * 业务主键
     */
    private String dtId;

    /**
     * 用户ID
     */
    private Long dtUserId;

    /**
     * 用户姓名
     */
    private String dtUserName;

    /**
     * 用户角色
     */
    private String dtRole;

    /**
     * 部门ID
     */
    private Long dtDeptId;

    /**
     * 部门名称（班组名称）
     */
    private String dtDeptName;

    /**
     * 科室ID
     */
    private Long dtDepartmentId;

    /**
     * 科室名称
     */
    private String dtDepartmentName;

    /**
     * 配置ID
     */
    private String dtConfigId;

    /**
     * 业务日期（当日7:00-次日7:00）
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date dtBusinessDate;

    /**
     * 打卡时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dtClockTime;

    /**
     * 总得分
     */
    private BigDecimal dtTotalScore;

    /**
     * 任务状态（PENDING待答题/IN_PROGRESS答题中/COMPLETED已完成/EXPIRED已逾期）
     */
    private String dtStatus;

    /**
     * 过期时间（次日7:00）
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dtExpireTime;

    /**
     * 开始答题时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dtStartTime;

    /**
     * 提交答题时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dtSubmitTime;

    /**
     * 答题时间限制（秒）
     */
    private Integer dtTimeLimit;

    /**
     * 试卷总分（所有题目满分之和，非数据库字段）
     */
    @TableField(exist = false)
    private BigDecimal fullScore;

    /**
     * 题目总数（非数据库字段）
     */
    @TableField(exist = false)
    private Integer questionCount;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDtId() {
        return dtId;
    }

    public void setDtId(String dtId) {
        this.dtId = dtId;
    }

    public Long getDtUserId() {
        return dtUserId;
    }

    public void setDtUserId(Long dtUserId) {
        this.dtUserId = dtUserId;
    }

    public String getDtUserName() {
        return dtUserName;
    }

    public void setDtUserName(String dtUserName) {
        this.dtUserName = dtUserName;
    }

    public String getDtRole() {
        return dtRole;
    }

    public void setDtRole(String dtRole) {
        this.dtRole = dtRole;
    }

    public Long getDtDeptId() {
        return dtDeptId;
    }

    public void setDtDeptId(Long dtDeptId) {
        this.dtDeptId = dtDeptId;
    }

    public String getDtDeptName() {
        return dtDeptName;
    }

    public void setDtDeptName(String dtDeptName) {
        this.dtDeptName = dtDeptName;
    }

    public Long getDtDepartmentId() {
        return dtDepartmentId;
    }

    public void setDtDepartmentId(Long dtDepartmentId) {
        this.dtDepartmentId = dtDepartmentId;
    }

    public String getDtDepartmentName() {
        return dtDepartmentName;
    }

    public void setDtDepartmentName(String dtDepartmentName) {
        this.dtDepartmentName = dtDepartmentName;
    }

    public String getDtConfigId() {
        return dtConfigId;
    }

    public void setDtConfigId(String dtConfigId) {
        this.dtConfigId = dtConfigId;
    }

    public Date getDtBusinessDate() {
        return dtBusinessDate;
    }

    public void setDtBusinessDate(Date dtBusinessDate) {
        this.dtBusinessDate = dtBusinessDate;
    }

    public Date getDtClockTime() {
        return dtClockTime;
    }

    public void setDtClockTime(Date dtClockTime) {
        this.dtClockTime = dtClockTime;
    }

    public BigDecimal getDtTotalScore() {
        return dtTotalScore;
    }

    public void setDtTotalScore(BigDecimal dtTotalScore) {
        this.dtTotalScore = dtTotalScore;
    }

    public String getDtStatus() {
        return dtStatus;
    }

    public void setDtStatus(String dtStatus) {
        this.dtStatus = dtStatus;
    }

    public Date getDtExpireTime() {
        return dtExpireTime;
    }

    public void setDtExpireTime(Date dtExpireTime) {
        this.dtExpireTime = dtExpireTime;
    }

    public Date getDtStartTime() {
        return dtStartTime;
    }

    public void setDtStartTime(Date dtStartTime) {
        this.dtStartTime = dtStartTime;
    }

    public Date getDtSubmitTime() {
        return dtSubmitTime;
    }

    public void setDtSubmitTime(Date dtSubmitTime) {
        this.dtSubmitTime = dtSubmitTime;
    }

    public Integer getDtTimeLimit() {
        return dtTimeLimit;
    }

    public void setDtTimeLimit(Integer dtTimeLimit) {
        this.dtTimeLimit = dtTimeLimit;
    }

    public BigDecimal getFullScore() {
        return fullScore;
    }

    public void setFullScore(BigDecimal fullScore) {
        this.fullScore = fullScore;
    }

    public Integer getQuestionCount() {
        return questionCount;
    }

    public void setQuestionCount(Integer questionCount) {
        this.questionCount = questionCount;
    }

    @Override
    public String toString() {
        return "DailyTask{" +
                "id=" + id +
                ", dtId='" + dtId + '\'' +
                ", dtUserId=" + dtUserId +
                ", dtUserName='" + dtUserName + '\'' +
                ", dtRole='" + dtRole + '\'' +
                ", dtDeptId=" + dtDeptId +
                ", dtDeptName='" + dtDeptName + '\'' +
                ", dtDepartmentId=" + dtDepartmentId +
                ", dtDepartmentName='" + dtDepartmentName + '\'' +
                ", dtConfigId='" + dtConfigId + '\'' +
                ", dtBusinessDate=" + dtBusinessDate +
                ", dtClockTime=" + dtClockTime +
                ", dtTotalScore=" + dtTotalScore +
                ", dtStatus='" + dtStatus + '\'' +
                ", dtExpireTime=" + dtExpireTime +
                ", dtStartTime=" + dtStartTime +
                ", dtSubmitTime=" + dtSubmitTime +
                ", dtTimeLimit=" + dtTimeLimit +
                '}';
    }
}
