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>DailyAnswerRecord<br>
 * <b>说明：</b> 答题记录表 <br>
 * <b>著作权：</b> Copyright (C) 2025 SUNDOT CORPORATION<br>
 * <b>修改履历：
 *
 * @author Simon Lin
 */
@TableName("edu_cs_daily_answer_record")
public class DailyAnswerRecord extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

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

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

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

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

    /**
     * 套题序号
     */
    private Integer darSetNo;

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

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

    /**
     * 答题用时（秒）
     */
    private Integer darTimeUsed;

    /**
     * 总分
     */
    private BigDecimal darTotalScore;

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

    /**
     * 正确题数
     */
    private Integer darCorrectCount;

    /**
     * 错误题数
     */
    private Integer darWrongCount;

    /**
     * 超时未答题数
     */
    private Integer darTimeoutCount;

    /**
     * 正确率（%）
     */
    private BigDecimal darCorrectRate;

    /**
     * 提交类型（MANUAL手动提交/AUTO_TIMEOUT超时自动提交）
     */
    private String darSubmitType;

    public Long getId() {
        return id;
    }

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

    public String getDarId() {
        return darId;
    }

    public void setDarId(String darId) {
        this.darId = darId;
    }

    public Long getDarUserId() {
        return darUserId;
    }

    public void setDarUserId(Long darUserId) {
        this.darUserId = darUserId;
    }

    public String getDarTaskId() {
        return darTaskId;
    }

    public void setDarTaskId(String darTaskId) {
        this.darTaskId = darTaskId;
    }

    public Integer getDarSetNo() {
        return darSetNo;
    }

    public void setDarSetNo(Integer darSetNo) {
        this.darSetNo = darSetNo;
    }

    public Date getDarStartTime() {
        return darStartTime;
    }

    public void setDarStartTime(Date darStartTime) {
        this.darStartTime = darStartTime;
    }

    public Date getDarSubmitTime() {
        return darSubmitTime;
    }

    public void setDarSubmitTime(Date darSubmitTime) {
        this.darSubmitTime = darSubmitTime;
    }

    public Integer getDarTimeUsed() {
        return darTimeUsed;
    }

    public void setDarTimeUsed(Integer darTimeUsed) {
        this.darTimeUsed = darTimeUsed;
    }

    public BigDecimal getDarTotalScore() {
        return darTotalScore;
    }

    public void setDarTotalScore(BigDecimal darTotalScore) {
        this.darTotalScore = darTotalScore;
    }

    public BigDecimal getDarActualScore() {
        return darActualScore;
    }

    public void setDarActualScore(BigDecimal darActualScore) {
        this.darActualScore = darActualScore;
    }

    public Integer getDarCorrectCount() {
        return darCorrectCount;
    }

    public void setDarCorrectCount(Integer darCorrectCount) {
        this.darCorrectCount = darCorrectCount;
    }

    public Integer getDarWrongCount() {
        return darWrongCount;
    }

    public void setDarWrongCount(Integer darWrongCount) {
        this.darWrongCount = darWrongCount;
    }

    public Integer getDarTimeoutCount() {
        return darTimeoutCount;
    }

    public void setDarTimeoutCount(Integer darTimeoutCount) {
        this.darTimeoutCount = darTimeoutCount;
    }

    public BigDecimal getDarCorrectRate() {
        return darCorrectRate;
    }

    public void setDarCorrectRate(BigDecimal darCorrectRate) {
        this.darCorrectRate = darCorrectRate;
    }

    public String getDarSubmitType() {
        return darSubmitType;
    }

    public void setDarSubmitType(String darSubmitType) {
        this.darSubmitType = darSubmitType;
    }

    @Override
    public String toString() {
        return "DailyAnswerRecord{" +
                "id=" + id +
                ", darId='" + darId + '\'' +
                ", darUserId=" + darUserId +
                ", darTaskId='" + darTaskId + '\'' +
                ", darSetNo=" + darSetNo +
                ", darStartTime=" + darStartTime +
                ", darSubmitTime=" + darSubmitTime +
                ", darTimeUsed=" + darTimeUsed +
                ", darTotalScore=" + darTotalScore +
                ", darActualScore=" + darActualScore +
                ", darCorrectCount=" + darCorrectCount +
                ", darWrongCount=" + darWrongCount +
                ", darTimeoutCount=" + darTimeoutCount +
                ", darCorrectRate=" + darCorrectRate +
                ", darSubmitType='" + darSubmitType + '\'' +
                '}';
    }
}
