mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 11:26:50 +08:00
30 lines
653 B
Java
30 lines
653 B
Java
package com.xboe.enums;
|
|
|
|
import lombok.Getter;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.Objects;
|
|
|
|
@Getter
|
|
public enum CourseStatusEnum {
|
|
|
|
STATUS_NONE(1, "-"),
|
|
STATUS_SUBMIT(2, "审核中"),
|
|
STATUS_AUDIT_NOPASS(3, "审核驳回"),
|
|
STATUS_AUDIT_FINISH(5, "审核通过")
|
|
;
|
|
|
|
private final int code;
|
|
|
|
private final String label;
|
|
|
|
CourseStatusEnum(int code, String label) {
|
|
this.code = code;
|
|
this.label = label;
|
|
}
|
|
|
|
public static CourseStatusEnum getByCode(Integer code) {
|
|
return Arrays.stream(values()).filter(item -> Objects.equals(item.code, code)).findFirst().orElse(STATUS_NONE);
|
|
}
|
|
}
|