TASK:mannequin;

This commit is contained in:
shahaibo
2025-05-29 16:17:39 +08:00
parent 8003a799c2
commit 276994759e
16 changed files with 229 additions and 98 deletions

View File

@@ -0,0 +1,41 @@
package com.ai.da.model.enums;
import com.fasterxml.jackson.annotation.JsonValue;
public enum CollectionType implements IEnumDisplay {
DESIGN("Design"),
TO_PRODUCT_IMAGE("ToProductImage"),
RELIGHT("Relight"),
POSE_TRANSFORM("PoseTransfer")
;
private String value;
CollectionType(String value) {
this.value = value;
}
@Override
@JsonValue
public String getValue() {
return this.value;
}
public static CollectionType getAgeGroup(String value) {
for (CollectionType group : values()) {
if (group.value.equalsIgnoreCase(value)) {
return group;
}
}
throw new IllegalArgumentException("No matching constant for [" + value + "]");
}
public static boolean isValidName(String name) {
for (CollectionType ageGroup : CollectionType.values()) {
if (ageGroup.name().equalsIgnoreCase(name)) {
return true;
}
}
return false;
}
}