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

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

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

@Entity
@Table(name = "eb_data_sync")
public class DataSync implements Serializable {

    private static final long serialVersionUID = 7371535739573217406L;

    @Id
    private Integer examId;

    @Column(name = "school_id")
    private Integer schoolId;

    /**
     * 来源
     */
    @Column(name = "source", length = 16, nullable = false)
    @Enumerated(EnumType.STRING)
    private ExamSource source;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time")
    private Date createTime;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "update_time")
    private Date updateTime;

    @Column(name = "root_org_id")
    private String rootOrgId;

    @Column(name = "cloud_exam_id", nullable = false)
    private String cloudExamId;

    @Column(name = "subject_code")
    private String subjectCode;

    @Column(name = "next_id")
    private Long nextId;

    @Column(name = "app_id")
    private String appId;

    @Column(name = "access_key", nullable = true, length = 64)
    private String accessKey;

    @Column(name = "access_secret", length = 64)
    private String accessSecret;

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

    @Column(name = "student_url", nullable = false)
    private String studentUrl;

    @Column(name = "subject_url", nullable = false)
    private String subjectUrl;

    @Column(name = "subject_paper_url", nullable = false)
    private String subjectPaperUrl;

    public Integer getExamId() {
        return examId;
    }

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

    public Integer getSchoolId() {
        return schoolId;
    }

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

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

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

    public String getRootOrgId() {
        return rootOrgId;
    }

    public void setRootOrgId(String rootOrgId) {
        this.rootOrgId = rootOrgId;
    }

    public String getCloudExamId() {
        return cloudExamId;
    }

    public void setCloudExamId(String cloudExamId) {
        this.cloudExamId = cloudExamId;
    }

    public String getSubjectCode() {
        return subjectCode;
    }

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

    public Long getNextId() {
        return nextId;
    }

    public void setNextId(Long nextId) {
        this.nextId = nextId;
    }

    public String getStudentUrl() {
        return studentUrl;
    }

    public void setStudentUrl(String studentUrl) {
        this.studentUrl = studentUrl;
    }

    public boolean isFinished() {
        return finished;
    }

    public void setFinished(boolean finished) {
        this.finished = finished;
    }

    public String getSubjectUrl() {
        return subjectUrl;
    }

    public void setSubjectUrl(String subjectUrl) {
        this.subjectUrl = subjectUrl;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public ExamSource getSource() {
        return source;
    }

    public void setSource(ExamSource source) {
        this.source = source;
    }

    public String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public String getAccessSecret() {
        return accessSecret;
    }

    public void setAccessSecret(String accessSecret) {
        this.accessSecret = accessSecret;
    }

    public String getSubjectPaperUrl() {
        return subjectPaperUrl;
    }

    public void setSubjectPaperUrl(String subjectPaperUrl) {
        this.subjectPaperUrl = subjectPaperUrl;
    }

}
