package com.sundot.airport.exam.domain;

import com.baomidou.mybatisplus.annotation.IdType;
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>DailyTaskDetail<br>
 * <b>说明：</b> 每日答题任务明细表 <br>
 * <b>著作权：</b> Copyright (C) 2025 SUNDOT CORPORATION<br>
 * <b>修改履历：
 *
 * @author Simon Lin
 */
@TableName("edu_cs_daily_task_detail")
public class DailyTaskDetail extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

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

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

    /**
     * 任务ID
     */
    private String dtdTaskId;

    /**
     * 题目序号（第几题）
     */
    private Integer dtdQuestionNo;

    /**
     * 题目ID（关联edu_cs_ques）
     */
    private String dtdQuesId;

    /**
     * 题目内容（快照）
     */
    private String dtdQuesContent;

    /**
     * 题目类型（SINGLE/MULTIPLE/JUDGMENT）
     */
    private String dtdQuesType;

    /**
     * 模块ID
     */
    private String dtdModuleId;

    /**
     * 模块名称
     */
    private String dtdModuleName;

    /**
     * 该题分值
     */
    private BigDecimal dtdScore;

    /**
     * 答题状态（PENDING待答题/ANSWERED已答题/TIMEOUT超时未答）
     */
    private String dtdAnswerStatus;

    /**
     * 用户答案
     */
    private String dtdUserAnswer;

    /**
     * 正确答案
     */
    private String dtdCorrectAnswer;

    /**
     * 是否正确（0错误 1正确）
     */
    private Boolean dtdIsCorrect;

    /**
     * 实际得分
     */
    private BigDecimal dtdActualScore;

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

    public Long getId() {
        return id;
    }

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

    public String getDtdId() {
        return dtdId;
    }

    public void setDtdId(String dtdId) {
        this.dtdId = dtdId;
    }

    public String getDtdTaskId() {
        return dtdTaskId;
    }

    public void setDtdTaskId(String dtdTaskId) {
        this.dtdTaskId = dtdTaskId;
    }

    public Integer getDtdQuestionNo() {
        return dtdQuestionNo;
    }

    public void setDtdQuestionNo(Integer dtdQuestionNo) {
        this.dtdQuestionNo = dtdQuestionNo;
    }

    public String getDtdQuesId() {
        return dtdQuesId;
    }

    public void setDtdQuesId(String dtdQuesId) {
        this.dtdQuesId = dtdQuesId;
    }

    public String getDtdQuesContent() {
        return dtdQuesContent;
    }

    public void setDtdQuesContent(String dtdQuesContent) {
        this.dtdQuesContent = dtdQuesContent;
    }

    public String getDtdQuesType() {
        return dtdQuesType;
    }

    public void setDtdQuesType(String dtdQuesType) {
        this.dtdQuesType = dtdQuesType;
    }

    public String getDtdModuleId() {
        return dtdModuleId;
    }

    public void setDtdModuleId(String dtdModuleId) {
        this.dtdModuleId = dtdModuleId;
    }

    public String getDtdModuleName() {
        return dtdModuleName;
    }

    public void setDtdModuleName(String dtdModuleName) {
        this.dtdModuleName = dtdModuleName;
    }

    public BigDecimal getDtdScore() {
        return dtdScore;
    }

    public void setDtdScore(BigDecimal dtdScore) {
        this.dtdScore = dtdScore;
    }

    public String getDtdAnswerStatus() {
        return dtdAnswerStatus;
    }

    public void setDtdAnswerStatus(String dtdAnswerStatus) {
        this.dtdAnswerStatus = dtdAnswerStatus;
    }

    public String getDtdUserAnswer() {
        return dtdUserAnswer;
    }

    public void setDtdUserAnswer(String dtdUserAnswer) {
        this.dtdUserAnswer = dtdUserAnswer;
    }

    public String getDtdCorrectAnswer() {
        return dtdCorrectAnswer;
    }

    public void setDtdCorrectAnswer(String dtdCorrectAnswer) {
        this.dtdCorrectAnswer = dtdCorrectAnswer;
    }

    public Boolean getDtdIsCorrect() {
        return dtdIsCorrect;
    }

    public void setDtdIsCorrect(Boolean dtdIsCorrect) {
        this.dtdIsCorrect = dtdIsCorrect;
    }

    public BigDecimal getDtdActualScore() {
        return dtdActualScore;
    }

    public void setDtdActualScore(BigDecimal dtdActualScore) {
        this.dtdActualScore = dtdActualScore;
    }

    public Date getDtdAnswerTime() {
        return dtdAnswerTime;
    }

    public void setDtdAnswerTime(Date dtdAnswerTime) {
        this.dtdAnswerTime = dtdAnswerTime;
    }

    @Override
    public String toString() {
        return "DailyTaskDetail{" +
                "id=" + id +
                ", dtdId='" + dtdId + '\'' +
                ", dtdTaskId='" + dtdTaskId + '\'' +
                ", dtdQuestionNo=" + dtdQuestionNo +
                ", dtdQuesId='" + dtdQuesId + '\'' +
                ", dtdQuesContent='" + dtdQuesContent + '\'' +
                ", dtdQuesType='" + dtdQuesType + '\'' +
                ", dtdModuleId='" + dtdModuleId + '\'' +
                ", dtdModuleName='" + dtdModuleName + '\'' +
                ", dtdScore=" + dtdScore +
                ", dtdAnswerStatus='" + dtdAnswerStatus + '\'' +
                ", dtdUserAnswer='" + dtdUserAnswer + '\'' +
                ", dtdCorrectAnswer='" + dtdCorrectAnswer + '\'' +
                ", dtdIsCorrect=" + dtdIsCorrect +
                ", dtdActualScore=" + dtdActualScore +
                ", dtdAnswerTime=" + dtdAnswerTime +
                '}';
    }
}
