【增加】Ai Image 增加 PublicStatus 枚举
This commit is contained in:
parent
599a114a0f
commit
aea4f465ee
|
@ -0,0 +1,36 @@
|
|||
package cn.iocoder.yudao.module.ai.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* ai绘画 public 状态
|
||||
*
|
||||
* @author fansili
|
||||
* @time 2024/4/28 17:05
|
||||
* @since 1.0
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum AiImagePublicStatusEnum {
|
||||
|
||||
PRIVATE("private", "私有"),
|
||||
PUBLIC("public", "公开"),
|
||||
|
||||
;
|
||||
|
||||
// TODO @fan:final 一下
|
||||
private final String status;
|
||||
|
||||
private final String name;
|
||||
|
||||
|
||||
public static AiImagePublicStatusEnum valueOfStatus(String status) {
|
||||
for (AiImagePublicStatusEnum itemEnum : AiImagePublicStatusEnum.values()) {
|
||||
if (itemEnum.getStatus().equals(status)) {
|
||||
return itemEnum;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid MessageType value: " + status);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue