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

import cn.com.qmth.stmms.common.enums.CheckType;

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

@Entity
@Table(name = "eb_check_student")
public class CheckStudent implements Serializable {

    private static final long serialVersionUID = -4313571132768546289L;

    @Id
    @Column(name = "student_id")
    private Integer studentId;

    /**
     * 考试ID
     */
    @Column(name = "exam_id", nullable = false)
    private Integer examId;

    /**
     * 科目代码
     */
    @Column(name = "subject_code", nullable = false)
    private String subjectCode;

    /**
     * 处理类型
     */
    @Enumerated(EnumType.STRING)
    @Column(name = "type", length = 16, nullable = false)
    private CheckType type;

    /**
     * 是否被处理
     */
    @Column(name = "is_checked")
    private boolean checked;

    /**
     * 处理时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "update_time")
    private Date updateTime;

    public CheckStudent() {
    }

    public CheckStudent(Integer studentId, Integer examId, String subjectCode, CheckType type) {
        this.studentId = studentId;
        this.examId = examId;
        this.subjectCode = subjectCode;
        this.type = type;
        this.checked = false;
    }

    public Integer getExamId() {
        return examId;
    }

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

    public Integer getStudentId() {
        return studentId;
    }

    public void setStudentId(Integer studentId) {
        this.studentId = studentId;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getSubjectCode() {
        return subjectCode;
    }

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

    public CheckType getType() {
        return type;
    }

    public void setType(CheckType type) {
        this.type = type;
    }

}
