Commit 64d4f18d authored by bing zhang's avatar bing zhang
Browse files

1

parent 539344b2
package com.mindskip.xzs.domain.enums;
import java.util.HashMap;
import java.util.Map;
public enum ExamPaperAnswerStatusEnum {
WaitJudge(1, "待批改"),
Complete(2, "完成");
int code;
String name;
ExamPaperAnswerStatusEnum(int code, String name) {
this.code = code;
this.name = name;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
private static final Map<Integer, ExamPaperAnswerStatusEnum> keyMap = new HashMap<>();
static {
for (ExamPaperAnswerStatusEnum item : ExamPaperAnswerStatusEnum.values()) {
keyMap.put(item.getCode(), item);
}
}
public static ExamPaperAnswerStatusEnum fromCode(Integer code) {
return keyMap.get(code);
}
}
package com.mindskip.xzs.domain.enums;
import java.util.HashMap;
import java.util.Map;
public enum ExamPaperTypeEnum {
Fixed(1, "固定试卷"),
TimeLimit(4, "时段试卷"),
Task(6, "任务试卷");
int code;
String name;
ExamPaperTypeEnum(int code, String name) {
this.code = code;
this.name = name;
}
private static final Map<Integer, ExamPaperTypeEnum> keyMap = new HashMap<>();
static {
for (ExamPaperTypeEnum item : ExamPaperTypeEnum.values()) {
keyMap.put(item.getCode(), item);
}
}
public static ExamPaperTypeEnum fromCode(Integer code) {
return keyMap.get(code);
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.mindskip.xzs.domain.enums;
public enum QuestionStatusEnum {
OK(1, "正常"),
Publish(2, "发布");
int code;
String name;
QuestionStatusEnum(int code, String name) {
this.code = code;
this.name = name;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.mindskip.xzs.domain.enums;
import java.util.HashMap;
import java.util.Map;
public enum QuestionTypeEnum {
SingleChoice(1, "单选题"),
MultipleChoice(2, "多选题"),
TrueFalse(3, "判断题"),
GapFilling(4, "填空题"),
ShortAnswer(5, "简答题");
int code;
String name;
QuestionTypeEnum(int code, String name) {
this.code = code;
this.name = name;
}
private static final Map<Integer, QuestionTypeEnum> keyMap = new HashMap<>();
static {
for (QuestionTypeEnum item : QuestionTypeEnum.values()) {
keyMap.put(item.getCode(), item);
}
}
public static QuestionTypeEnum fromCode(Integer code) {
return keyMap.get(code);
}
public static boolean needSaveTextContent(Integer code) {
QuestionTypeEnum questionTypeEnum = QuestionTypeEnum.fromCode(code);
switch (questionTypeEnum) {
case GapFilling:
case ShortAnswer:
return true;
default:
return false;
}
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.mindskip.xzs.domain.enums;
import java.util.HashMap;
import java.util.Map;
public enum RoleEnum {
STUDENT(1, "STUDENT"),
ADMIN(3, "ADMIN");
int code;
String name;
RoleEnum(int code, String name) {
this.code = code;
this.name = name;
}
private static final Map<Integer, RoleEnum> keyMap = new HashMap<>();
static {
for (RoleEnum item : RoleEnum.values()) {
keyMap.put(item.getCode(), item);
}
}
public static RoleEnum fromCode(Integer code) {
return keyMap.get(code);
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRoleName() {
return "ROLE_" + name;
}
}
package com.mindskip.xzs.domain.enums;
import java.util.HashMap;
import java.util.Map;
public enum UserStatusEnum {
Enable(1, "启用"),
Disable(2, "禁用");
int code;
String name;
UserStatusEnum(int code, String name) {
this.code = code;
this.name = name;
}
private static final Map<Integer, UserStatusEnum> keyMap = new HashMap<>();
static {
for (UserStatusEnum item : UserStatusEnum.values()) {
keyMap.put(item.getCode(), item);
}
}
public static UserStatusEnum fromCode(Integer code) {
return keyMap.get(code);
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.mindskip.xzs.domain.exam;
public class ExamPaperQuestionItemObject {
private Integer id;
private Integer itemOrder;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getItemOrder() {
return itemOrder;
}
public void setItemOrder(Integer itemOrder) {
this.itemOrder = itemOrder;
}
}
package com.mindskip.xzs.domain.exam;
import java.util.List;
public class ExamPaperTitleItemObject {
private String name;
private List<ExamPaperQuestionItemObject> questionItems;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<ExamPaperQuestionItemObject> getQuestionItems() {
return questionItems;
}
public void setQuestionItems(List<ExamPaperQuestionItemObject> questionItems) {
this.questionItems = questionItems;
}
}
package com.mindskip.xzs.domain.other;
public class ExamPaperAnswerUpdate {
private Integer id;
private Integer customerScore;
private Boolean doRight;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getCustomerScore() {
return customerScore;
}
public void setCustomerScore(Integer customerScore) {
this.customerScore = customerScore;
}
public Boolean getDoRight() {
return doRight;
}
public void setDoRight(Boolean doRight) {
this.doRight = doRight;
}
}
package com.mindskip.xzs.domain.other;
public class KeyValue {
private String name;
private Integer value;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
}
package com.mindskip.xzs.domain.question;
public class QuestionItemObject {
private String prefix;
private String content;
private Integer score;
private String itemUuid;
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public Integer getScore() {
return score;
}
public void setScore(Integer score) {
this.score = score;
}
public String getItemUuid() {
return itemUuid;
}
public void setItemUuid(String itemUuid) {
this.itemUuid = itemUuid;
}
}
package com.mindskip.xzs.domain.question;
import java.util.List;
public class QuestionObject {
private String titleContent;
private String analyze;
private List<QuestionItemObject> questionItemObjects;
private String correct;
public String getTitleContent() {
return titleContent;
}
public void setTitleContent(String titleContent) {
this.titleContent = titleContent;
}
public String getAnalyze() {
return analyze;
}
public void setAnalyze(String analyze) {
this.analyze = analyze;
}
public List<QuestionItemObject> getQuestionItemObjects() {
return questionItemObjects;
}
public void setQuestionItemObjects(List<QuestionItemObject> questionItemObjects) {
this.questionItemObjects = questionItemObjects;
}
public String getCorrect() {
return correct;
}
public void setCorrect(String correct) {
this.correct = correct;
}
}
package com.mindskip.xzs.domain.task;
public class TaskItemObject {
private Integer examPaperId;
private String examPaperName;
private Integer itemOrder;
public Integer getExamPaperId() {
return examPaperId;
}
public void setExamPaperId(Integer examPaperId) {
this.examPaperId = examPaperId;
}
public String getExamPaperName() {
return examPaperName;
}
public void setExamPaperName(String examPaperName) {
this.examPaperName = examPaperName;
}
public Integer getItemOrder() {
return itemOrder;
}
public void setItemOrder(Integer itemOrder) {
this.itemOrder = itemOrder;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment