Browse Source

。。。

wangwei 5 years ago
parent
commit
6813fd2a28

+ 173 - 0
src/main/java/cn/com/qmth/examcloud/support/examing/ExamingSession.java

@@ -0,0 +1,173 @@
+package cn.com.qmth.examcloud.support.examing;
+
+import java.util.Date;
+
+import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
+
+/**
+ * 考试会话
+ *
+ * @author WANGWEI
+ * @date 2019年12月9日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class ExamingSession implements JsonSerializable {
+
+	private static final long serialVersionUID = -7960639278784327099L;
+
+	/**
+	 * 全局唯一考试标识符
+	 */
+	private String key;
+
+	/**
+	 * 顶级机构ID
+	 */
+	private Long rootOrgId;
+
+	/**
+	 * 学生ID
+	 */
+	private Long studentId;
+
+	/**
+	 * 考试ID
+	 */
+	private Long examId;
+
+	/**
+	 * 课程ID
+	 */
+	private Long courseId;
+
+	/**
+	 * 考生ID
+	 */
+	private Long examStudentId;
+
+	/**
+	 * 耗时(单位:秒)
+	 */
+	private Long cost;
+
+	/**
+	 * 学生最后活动时间
+	 */
+	private Long activeTime;
+
+	/**
+	 * 是否交卷
+	 */
+	private Boolean handed;
+
+	/**
+	 * 是否终结
+	 */
+	private Boolean terminated;
+
+	/**
+	 * 创建时间
+	 */
+	private Date creationTime;
+
+	/**
+	 * 构建key
+	 *
+	 * @author WANGWEI
+	 * @return
+	 */
+	public String buildKey() {
+		this.key = new StringBuilder().append("EXAMING:").append(rootOrgId).append(":")
+				.append(studentId).toString();
+		return this.key;
+	}
+
+	public String getKey() {
+		return key;
+	}
+
+	public void setKey(String key) {
+		this.key = key;
+	}
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public Long getStudentId() {
+		return studentId;
+	}
+
+	public void setStudentId(Long studentId) {
+		this.studentId = studentId;
+	}
+
+	public Long getExamId() {
+		return examId;
+	}
+
+	public void setExamId(Long examId) {
+		this.examId = examId;
+	}
+
+	public Long getCourseId() {
+		return courseId;
+	}
+
+	public void setCourseId(Long courseId) {
+		this.courseId = courseId;
+	}
+
+	public Long getExamStudentId() {
+		return examStudentId;
+	}
+
+	public void setExamStudentId(Long examStudentId) {
+		this.examStudentId = examStudentId;
+	}
+
+	public Long getCost() {
+		return cost;
+	}
+
+	public void setCost(Long cost) {
+		this.cost = cost;
+	}
+
+	public Long getActiveTime() {
+		return activeTime;
+	}
+
+	public void setActiveTime(Long activeTime) {
+		this.activeTime = activeTime;
+	}
+
+	public Boolean getHanded() {
+		return handed;
+	}
+
+	public void setHanded(Boolean handed) {
+		this.handed = handed;
+	}
+
+	public Boolean getTerminated() {
+		return terminated;
+	}
+
+	public void setTerminated(Boolean terminated) {
+		this.terminated = terminated;
+	}
+
+	public Date getCreationTime() {
+		return creationTime;
+	}
+
+	public void setCreationTime(Date creationTime) {
+		this.creationTime = creationTime;
+	}
+
+}

+ 22 - 0
src/main/java/cn/com/qmth/examcloud/support/examing/ExamingStatus.java

@@ -0,0 +1,22 @@
+package cn.com.qmth.examcloud.support.examing;
+
+/**
+ * 考试状态
+ *
+ * @author WANGWEI
+ * @date 2019年12月9日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public enum ExamingStatus {
+
+	/**
+	 * 非正式状态
+	 */
+	INFORMAL,
+
+	/**
+	 * 正式状态
+	 */
+	FORMAL
+
+}