fix: SiteStatus 移除 PENDING,站点自身只有 active/deprecated

This commit is contained in:
mediabot-pt
2026-06-30 12:28:04 +08:00
parent 003ea023c3
commit 3a9b98ff5d

View File

@@ -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;
}
}