package com.qmth.teachcloud.report.business.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.teachcloud.common.contant.SystemConstant;
import com.qmth.teachcloud.report.business.enums.PaperStructJudgeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

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

/**
 * <p>
 * 教师下试卷结构维度分析表
 * </p>
 *
 * @author wangliang
 * @since 2021-07-20
 */
@ApiModel(value = "TAExamCourseTeacherPaperStruct对象", description = "教师下试卷结构维度分析表")
public class TAExamCourseTeacherPaperStruct implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id")
    private Long id;

    @ApiModelProperty(value = "学校id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "school_id")
    private Long schoolId;

    @ApiModelProperty(value = "试卷结构基础表id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "paper_struct_id")
    private Long paperStructId;

    @ApiModelProperty(value = "考试id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "exam_id")
    private Long examId;

    @ApiModelProperty(value = "课程编号")
    @TableField(value = "course_code")
    private String courseCode;

    @ApiModelProperty(value = "课程名称")
    @TableField(value = "course_name")
    private String courseName;

    @ApiModelProperty(value = "试卷id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "paper_id")
    private Long paperId;

    @ApiModelProperty(value = "教师id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "teacher_id")
    private Long teacherId;

    @ApiModelProperty(value = "教师名称")
    @TableField(value = "teacher_name")
    private String teacherName;

    @ApiModelProperty(value = "试卷类型")
    @TableField(value = "paper_type")
    private String paperType;

    @ApiModelProperty(value = "大题名称")
    @TableField(value = "question_name")
    private String questionName;

    @ApiModelProperty(value = "题号类型（客观题、主观题）")
    @TableField(value = "number_type")
    private String numberType;

    @ApiModelProperty(value = "大题号")
    @TableField(value = "big_question_number")
    private String bigQuestionNumber;

    @ApiModelProperty(value = "小题号(每一课程试卷的唯一标识)")
    @TableField(value = "small_question_number")
    private String smallQuestionNumber;

    @ApiModelProperty(value = "题目类型")
    @TableField(value = "question_type")
    private String questionType;

    @ApiModelProperty(value = "满分")
    @TableField(value = "full_score")
    private BigDecimal fullScore;

    @ApiModelProperty(value = "计分规则")
    @TableField(value = "score_rules")
    private String scoreRules;

    @ApiModelProperty(value = "规则说明")
    @TableField(value = "rules_desc")
    private String rulesDesc;

    @ApiModelProperty(value = "知识维度")
    @TableField(value = "knowledge_dimension")
    private String knowledgeDimension;

    @ApiModelProperty(value = "能力维度")
    @TableField(value = "ability_dimension")
    private String abilityDimension;

    @ApiModelProperty(value = "素养维度")
    @TableField(value = "literacy_dimension")
    private String literacyDimension;

    @ApiModelProperty(value = "标准难度系数（得分率）")
    @TableField(value = "standard_score_rate")
    private BigDecimal standardScoreRate;

    @ApiModelProperty(value = "得分率")
    @TableField(value = "score_rate")
    private BigDecimal scoreRate;

    @ApiModelProperty(value = "难度")
    @TableField(value = "difficult")
    private String difficult;

    @ApiModelProperty(value = "试卷结构每道题目正确（全对），错误枚举\nALL_CORRECT('全对'), NOT_QUITE_RIGHT('不完全正确的'),")
    @TableField(value = "paper_struct_judge")
    private PaperStructJudgeEnum paperStructJudge;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getId() {
        return id;
    }

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

    public Long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }

    public Long getPaperStructId() {
        return paperStructId;
    }

    public void setPaperStructId(Long paperStructId) {
        this.paperStructId = paperStructId;
    }

    public Long getExamId() {
        return examId;
    }

    public void setExamId(Long examId) {
        this.examId = examId;
    }

    public String getCourseCode() {
        return courseCode;
    }

    public void setCourseCode(String courseCode) {
        this.courseCode = courseCode;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public Long getPaperId() {
        return paperId;
    }

    public void setPaperId(Long paperId) {
        this.paperId = paperId;
    }

    public Long getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(Long teacherId) {
        this.teacherId = teacherId;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public String getPaperType() {
        return paperType;
    }

    public void setPaperType(String paperType) {
        this.paperType = paperType;
    }

    public String getQuestionName() {
        return questionName;
    }

    public void setQuestionName(String questionName) {
        this.questionName = questionName;
    }

    public String getNumberType() {
        return numberType;
    }

    public void setNumberType(String numberType) {
        this.numberType = numberType;
    }

    public String getBigQuestionNumber() {
        return bigQuestionNumber;
    }

    public void setBigQuestionNumber(String bigQuestionNumber) {
        this.bigQuestionNumber = bigQuestionNumber;
    }

    public String getSmallQuestionNumber() {
        return smallQuestionNumber;
    }

    public void setSmallQuestionNumber(String smallQuestionNumber) {
        this.smallQuestionNumber = smallQuestionNumber;
    }

    public String getQuestionType() {
        return questionType;
    }

    public void setQuestionType(String questionType) {
        this.questionType = questionType;
    }

    public BigDecimal getFullScore() {
        if (Objects.nonNull(fullScore)) {
            return fullScore.setScale(SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
        } else {
            return fullScore;
        }
    }

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

    public String getScoreRules() {
        return scoreRules;
    }

    public void setScoreRules(String scoreRules) {
        this.scoreRules = scoreRules;
    }

    public String getRulesDesc() {
        return rulesDesc;
    }

    public void setRulesDesc(String rulesDesc) {
        this.rulesDesc = rulesDesc;
    }

    public String getKnowledgeDimension() {
        return knowledgeDimension;
    }

    public void setKnowledgeDimension(String knowledgeDimension) {
        this.knowledgeDimension = knowledgeDimension;
    }

    public String getAbilityDimension() {
        return abilityDimension;
    }

    public void setAbilityDimension(String abilityDimension) {
        this.abilityDimension = abilityDimension;
    }

    public String getLiteracyDimension() {
        return literacyDimension;
    }

    public void setLiteracyDimension(String literacyDimension) {
        this.literacyDimension = literacyDimension;
    }

    public BigDecimal getStandardScoreRate() {
        if (Objects.nonNull(standardScoreRate)) {
            return standardScoreRate.setScale(SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
        } else {
            return standardScoreRate;
        }
    }

    public void setStandardScoreRate(BigDecimal standardScoreRate) {
        this.standardScoreRate = standardScoreRate;
    }

    public BigDecimal getScoreRate() {
        if (Objects.nonNull(scoreRate)) {
            return scoreRate.setScale(SystemConstant.CALCULATE_SCALE, BigDecimal.ROUND_HALF_UP);
        } else {
            return scoreRate;
        }
    }

    public void setScoreRate(BigDecimal scoreRate) {
        this.scoreRate = scoreRate;
    }

    public String getDifficult() {
        return difficult;
    }

    public void setDifficult(String difficult) {
        this.difficult = difficult;
    }

    public PaperStructJudgeEnum getPaperStructJudge() {
        return paperStructJudge;
    }

    public void setPaperStructJudge(PaperStructJudgeEnum paperStructJudge) {
        this.paperStructJudge = paperStructJudge;
    }
}
