fix: SiteStatus 移除 PENDING,站点自身只有 active/deprecated
This commit is contained in:
@@ -8,7 +8,6 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
*/
|
||||
public enum SiteStatus {
|
||||
ACTIVE("active", "活跃"),
|
||||
PENDING("pending", "待审核"),
|
||||
DEPRECATED("deprecated", "已弃用");
|
||||
|
||||
@EnumValue
|
||||
@@ -22,20 +21,13 @@ public enum SiteStatus {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
public String getValue() { return value; }
|
||||
public String getLabel() { return label; }
|
||||
|
||||
public static SiteStatus fromValue(String value) {
|
||||
for (SiteStatus status : values()) {
|
||||
if (status.value.equalsIgnoreCase(value)) {
|
||||
return status;
|
||||
}
|
||||
if (status.value.equalsIgnoreCase(value)) return status;
|
||||
}
|
||||
return PENDING;
|
||||
return ACTIVE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user