TASK: sketchBoard上传;工作空间列表;
This commit is contained in:
@@ -26,4 +26,13 @@ public enum FemalePosition implements IEnumDisplay {
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public static FemalePosition getPosition(String value) {
|
||||
for (FemalePosition position : values()) {
|
||||
if (position.value.equalsIgnoreCase(value)) {
|
||||
return position;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + value + "]");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,4 +24,13 @@ public enum MalePosition implements IEnumDisplay {
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public static MalePosition getPosition(String value) {
|
||||
for (MalePosition position : values()) {
|
||||
if (position.value.equalsIgnoreCase(value)) {
|
||||
return position;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + value + "]");
|
||||
}
|
||||
}
|
||||
|
||||
41
src/main/java/com/ai/da/model/enums/Position.java
Normal file
41
src/main/java/com/ai/da/model/enums/Position.java
Normal file
@@ -0,0 +1,41 @@
|
||||
package com.ai.da.model.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* @Author: SHAHAIBO
|
||||
* @Date: 2023/08/01 17:21
|
||||
* @Description: 服装性别分类
|
||||
*/
|
||||
public enum Position implements IEnumDisplay {
|
||||
OVERALL("Overall"),
|
||||
TOPS("Tops"),
|
||||
BOTTOMS("Bottoms"),
|
||||
OUTWEAR("Outwear"),
|
||||
BLOUSE("Blouse"),
|
||||
DRESS("Dress"),
|
||||
TROUSERS("Trousers"),
|
||||
SKIRT("Skirt");
|
||||
|
||||
private String value;
|
||||
|
||||
Position(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
@JsonValue
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public static Position getPosition(String value) {
|
||||
for (Position position : values()) {
|
||||
if (position.value.equalsIgnoreCase(value)) {
|
||||
return position;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + value + "]");
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ai.da.model.enums;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
@@ -10,7 +11,6 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
public enum Sex implements IEnumDisplay {
|
||||
|
||||
FEMALE("Female"),
|
||||
|
||||
MALE("Male")
|
||||
|
||||
// CHILD("Child")
|
||||
@@ -27,4 +27,13 @@ public enum Sex implements IEnumDisplay {
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public static Sex getSex(String value) {
|
||||
for (Sex sex : values()) {
|
||||
if (sex.value.equalsIgnoreCase(value)) {
|
||||
return sex;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("No matching constant for [" + value + "]");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user