package cn.com.qmth.stmms.biz.exam.model;

import cn.com.qmth.stmms.biz.user.model.User;
import cn.com.qmth.stmms.common.annotation.ExcelField;
import cn.com.qmth.stmms.common.enums.MarkMode;

import javax.persistence.*;
import java.io.Serializable;

@Entity
@Table(name = "eb_marker")
public class Marker implements Serializable {

    private static final long serialVersionUID = -5728058071677581938L;

    @Id
    @GeneratedValue
    private Integer id;

    @Column(name = "exam_id", nullable = false)
    private Integer examId;

    @Column(name = "subject_code", nullable = false)
    @ExcelField(title = "科目代码", align = 2, sort = 10)
    private String subjectCode;

    @Column(name = "group_number", nullable = false)
    @ExcelField(title = "分组号", align = 2, sort = 30)
    private Integer groupNumber;

    @Column(name = "user_id", nullable = false)
    private Integer userId;

    @Column(name = "enable", nullable = false)
    private boolean enable;

    @Column(name = "mode", nullable = true)
    @Enumerated(EnumType.STRING)
    private MarkMode mode;

    @Column(name = "top_count")
    private Integer topCount;

    @Column(name = "finish_count")
    private Integer finishCount;

    @Column(name = "valid_count")
    private Integer validCount;

    @Column(name = "reject_count")
    private Integer rejectCount;

    @Column(name = "avg_speed")
    private Double avgSpeed;

    @Column(name = "avg_score")
    private Double avgScore;

    @Column(name = "stdev_score")
    private Double stdevScore;

    /**
     * 个性化评卷参数设置
     */
    @Column(name = "mark_setting", nullable = true, columnDefinition = "text")
    private String markSetting;

    @Transient
    @ExcelField(title = "科目(导入时可为空)", align = 2, sort = 20)
    private String subjectName;

    @Transient
    private String groupName;

    @Transient
    @ExcelField(title = "用户名(登录名)", align = 2, sort = 40)
    private String loginName;

    @Transient
    private ExamSubject subject;

    @Transient
    private MarkGroup group;

    @Transient
    private long markedCount;

    @Transient
    private long currentCount;

    @Transient
    private User user;

    @Transient
    private boolean reseting;

    /**
     * 机组数量
     */
    @Transient
    private long classCount;

    public Marker() {
    }

    public Integer getId() {
        return id;
    }

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

    public Integer getExamId() {
        return examId;
    }

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

    public String getSubjectCode() {
        return subjectCode;
    }

    public void setSubjectCode(String subjectCode) {
        this.subjectCode = subjectCode;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public ExamSubject getSubject() {
        return subject;
    }

    public void setSubject(ExamSubject subject) {
        this.subject = subject;
    }

    public long getMarkedCount() {
        return markedCount;
    }

    public void setMarkedCount(long markedCount) {
        this.markedCount = markedCount;
    }

    public long getCurrentCount() {
        return currentCount;
    }

    public void setCurrentCount(long currentCount) {
        this.currentCount = currentCount;
    }

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public MarkMode getMode() {
        return mode;
    }

    public void setMode(MarkMode mode) {
        this.mode = mode;
    }

    public Integer getGroupNumber() {
        return groupNumber;
    }

    public void setGroupNumber(Integer groupNumber) {
        this.groupNumber = groupNumber;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public MarkGroup getGroup() {
        return group;
    }

    public void setGroup(MarkGroup group) {
        this.group = group;
    }

    public Integer getTopCount() {
        return topCount;
    }

    public void setTopCount(Integer topCount) {
        this.topCount = topCount;
    }

    public Integer getFinishCount() {
        return finishCount;
    }

    public void setFinishCount(Integer finishCount) {
        this.finishCount = finishCount;
    }

    public Integer getValidCount() {
        return validCount;
    }

    public void setValidCount(Integer validCount) {
        this.validCount = validCount;
    }

    public Double getAvgSpeed() {
        return avgSpeed;
    }

    public void setAvgSpeed(Double avgSpeed) {
        this.avgSpeed = avgSpeed;
    }

    public Double getAvgScore() {
        return avgScore;
    }

    public void setAvgScore(Double avgScore) {
        this.avgScore = avgScore;
    }

    public Double getStdevScore() {
        return stdevScore;
    }

    public void setStdevScore(Double stdevScore) {
        this.stdevScore = stdevScore;
    }

    public String getMarkSetting() {
        return markSetting;
    }

    public void setMarkSetting(String markSetting) {
        this.markSetting = markSetting;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public boolean isReseting() {
        return reseting;
    }

    public void setReseting(boolean reseting) {
        this.reseting = reseting;
    }

    public long getClassCount() {
        return classCount;
    }

    public void setClassCount(long classCount) {
        this.classCount = classCount;
    }

    public Integer getRejectCount() {
        return rejectCount;
    }

    public void setRejectCount(Integer rejectCount) {
        this.rejectCount = rejectCount;
    }

}
