TASK:cloud;

This commit is contained in:
shahaibo
2025-06-10 10:55:56 +08:00
parent d6bd24865e
commit ae71564b94
5 changed files with 148 additions and 9 deletions

View File

@@ -0,0 +1,44 @@
package com.ai.da.model.enums;
import com.fasterxml.jackson.annotation.JsonValue;
public enum UserBehaviorType implements IEnumDisplay {
PORTFOLIO_CLICK("portfolioClick"),
PORTFOLIO_LIKE("portfolioLike"),
SECOND_CREATION("secondCreation"),
SKETCH_LIKE("sketchLike")
// CHILD("Child")
;
private String value;
UserBehaviorType(String value) {
this.value = value;
}
public static boolean isValidName(String name) {
for (Sex sex : Sex.values()) {
if (sex.name().equalsIgnoreCase(name)) {
return true;
}
}
return false;
}
@Override
@JsonValue
public String getValue() {
return this.value;
}
public static UserBehaviorType getType(String value) {
for (UserBehaviorType type : values()) {
if (type.value.equalsIgnoreCase(value)) {
return type;
}
}
throw new IllegalArgumentException("No matching constant for [" + value + "]");
}
}