You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
655 B
Java
38 lines
655 B
Java
package com.sztzjy.linkCommerce.enums;
|
|
|
|
|
|
import com.sztzjy.linkCommerce.util.EnumUtil;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Getter;
|
|
|
|
|
|
/**
|
|
* 进行中 ING
|
|
* 已结束 END
|
|
* 未开始 READY
|
|
*/
|
|
|
|
@Getter
|
|
@AllArgsConstructor
|
|
public enum StartStatusEnum {
|
|
|
|
// 未开始
|
|
READY(-1, "未开始"),
|
|
// 进行中
|
|
ING(0, "进行中"),
|
|
// 已结束
|
|
END(1, "已结束")
|
|
;
|
|
|
|
private Integer code;
|
|
|
|
// 可以转换成中文
|
|
// @JsonValue
|
|
|
|
private String text;
|
|
public static StartStatusEnum getByCode(Integer code) {
|
|
return EnumUtil.getByFieldWithValue(StartStatusEnum.class, "code", code);
|
|
}
|
|
|
|
|
|
} |