TASK:模块化;
This commit is contained in:
32
src/main/java/com/ai/da/model/enums/BuildType.java
Normal file
32
src/main/java/com/ai/da/model/enums/BuildType.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package com.ai.da.model.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
public enum BuildType implements IEnumDisplay {
|
||||
DESIGN("design"),
|
||||
TO_PRODUCT_IMAGE("toProductImage"),
|
||||
|
||||
RELIGHT("relight")
|
||||
;
|
||||
|
||||
private String value;
|
||||
|
||||
BuildType(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public static BuildType getBuildType(String value) {
|
||||
for (BuildType type : values()) {
|
||||
if (type.value.equalsIgnoreCase(value)) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + value + "]");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user