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 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 = "TAExamCourseTeacherCollegeDifficult对象", description = "授课教师-本院难度分布和该教师在本院难度分布对比")
public class TAExamCourseTeacherCollegeDifficult implements Serializable {

    private static final long serialVersionUID = 1L;

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

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

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

    @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 = "试卷类型")
    @TableField(value = "paper_type")
    private String paperType;

    @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 = "考察学院id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "inspect_college_id")
    private Long inspectCollegeId;

    @ApiModelProperty(value = "考察学院名称")
    @TableField(value = "inspect_college_name")
    private String inspectCollegeName;

    @ApiModelProperty(value = "难度类型")
    @TableField(value = "interpret")
    private String interpret;

    @ApiModelProperty(value = "该难度题目数量")
    @TableField(value = "count")
    private Integer count;

    @ApiModelProperty(value = "难度范围")
    @TableField(value = "scope")
    private String scope;

    @ApiModelProperty(value = "各难度题在考察学院集合的平均得分率")
    @TableField(value = "col_avg_score_rate")
    private BigDecimal colAvgScoreRate;

    @ApiModelProperty(value = "各难度题在教师考察学院下集合的平均得分率")
    @TableField(value = "tea_col_avg_score_rate")
    private BigDecimal teaColAvgScoreRate;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getId() {
        return id;
    }

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

    public Long getExamId() {
        return examId;
    }

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

    public Long getSchoolId() {
        return schoolId;
    }

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

    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 String getPaperType() {
        return paperType;
    }

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

    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 Long getInspectCollegeId() {
        return inspectCollegeId;
    }

    public void setInspectCollegeId(Long inspectCollegeId) {
        this.inspectCollegeId = inspectCollegeId;
    }

    public String getInspectCollegeName() {
        return inspectCollegeName;
    }

    public void setInspectCollegeName(String inspectCollegeName) {
        this.inspectCollegeName = inspectCollegeName;
    }

    public String getInterpret() {
        return interpret;
    }

    public void setInterpret(String interpret) {
        this.interpret = interpret;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }

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

    public void setColAvgScoreRate(BigDecimal colAvgScoreRate) {
        this.colAvgScoreRate = colAvgScoreRate;
    }

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

    public void setTeaColAvgScoreRate(BigDecimal teaColAvgScoreRate) {
        this.teaColAvgScoreRate = teaColAvgScoreRate;
    }
}
