beetlsql3-dev
Mlxa0324 2 years ago
parent 9e784c7c7b
commit 026bcef79f

@ -1,31 +1,27 @@
package com.ibeetl.jlw.enums;
import cn.jlw.util.EnumUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.beetl.sql.annotation.entity.EnumMapping;
/**
*
*/
@Getter
@AllArgsConstructor
@EnumMapping("name")
public enum OpenCourseMergeJoinTypeEnum {
// 进行中
student_join(0, "选择学生方式加入"),
code_join(0, "授权码方式加入"),
// 已结束
class_join(1, "班级方式加入");
@Getter
private Integer code;
@Getter
private String text;
OpenCourseMergeJoinTypeEnum(Integer code, String text) {
this.text = text;
this.code = code;
}
public static OpenCourseMergeJoinTypeEnum getByCode(Integer code) {
return EnumUtil.getByFieldWithValue(OpenCourseMergeJoinTypeEnum.class, "code", code);
}

@ -1,8 +1,9 @@
package com.ibeetl.jlw.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.beetl.sql.annotation.entity.EnumValue;
import org.beetl.sql.annotation.entity.EnumMapping;
/**
* <p>
@ -15,6 +16,9 @@ import org.beetl.sql.annotation.entity.EnumValue;
* @modified
*/
@Getter
@AllArgsConstructor
@EnumMapping("name")
public enum ResourcesQuestionSnapshotFromTypeEnum {
HOMEWORK_QUESTION("作业-题目类型"),
@ -24,11 +28,6 @@ public enum ResourcesQuestionSnapshotFromTypeEnum {
CHAPTER_EXERCISE("章节练习");
@EnumValue
private String name = this.name();
@Getter
private String text;
ResourcesQuestionSnapshotFromTypeEnum(String text) {
this.text = text;
}
}

@ -1,13 +1,19 @@
package com.ibeetl.jlw.enums;
import cn.jlw.util.EnumUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import org.beetl.sql.annotation.entity.EnumMapping;
/**
* ING
* END
* READY
*/
@Getter
@AllArgsConstructor
@EnumMapping("text")
public enum StartStatusEnum {
// 进行中
ING(0, "进行中"),
@ -15,17 +21,14 @@ public enum StartStatusEnum {
END(1, "已结束"),
// 未开始
READY(-1, "未开始");
@Getter
private Integer code;
// 可以转换成中文
// @JsonValue
private String text;
@Getter
private Integer code;
StartStatusEnum(Integer code, String text) {
this.text = text;
this.code = code;
}
public static StartStatusEnum getByCode(Integer code) {
return EnumUtil.getByFieldWithValue(StartStatusEnum.class, "code", code);

Loading…
Cancel
Save