【增加】Ai Image 增加 PublicStatus 枚举

This commit is contained in:
cherishsince 2024-05-30 10:12:25 +08:00
parent 599a114a0f
commit aea4f465ee
1 changed files with 36 additions and 0 deletions

View File

@ -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 @fanfinal 一下
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);
}
}