From 1b725fd517d729f34544f6330f6898d25efabab0 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Wed, 29 May 2024 10:19:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E8=B0=83?= =?UTF-8?q?=E6=95=B4=20AI=20Image=20=E5=A2=9E=E8=82=8C=20draw=20rquest=20?= =?UTF-8?q?=E5=92=8C=20response?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/dal/dataobject/image/AiImageDO.java | 62 +++++++++---------- 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java index 2a21acd13..d18d03d38 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/dal/dataobject/image/AiImageDO.java @@ -6,19 +6,16 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.experimental.Accessors; -// TODO @fan:@time、@sine 注解可以不加哈 +import java.util.Map; + /** * AI 绘画 DO * * @author fansili - * @time 2024/4/25 15:53 - * @since 1.0 */ +@TableName("ai_image") @Data -@Accessors(chain = true) // TODO @fan:这个不用添加哈,全局的 lombok.config 搞啦 -@TableName("ai_image") // TODO @fan:建议放在 @Data 前面,因为它是关键注解,@Data 本质可悲替代 public class AiImageDO extends BaseDO { @TableId(type = IdType.AUTO) @@ -30,50 +27,49 @@ public class AiImageDO extends BaseDO { @Schema(description = "提示词") private String prompt; - // TODO @fan:要加一个平台字段;platform;因为一个平台,会有多种 model 模型; + @Schema(description = "平台") + private String platform; @Schema(description = "模型") private String model; - // TODO @fan:这个记录到 db,要不改成 width、height?更明确的尺寸 - @Schema(description = "尺寸大小") - private String size; + @Schema(description = "图片宽度") + private String width; - // TODO @fan:style 是所有模型都有么?如果不是,是不是靠 drawRequest 记录下就好了; - @Schema(description = "风格") - private String style; - - @Schema(description = "图片地址(自己服务器)") - private String picUrl; + @Schema(description = "图片高度") + private String height; @Schema(description = "绘画状态:提交、排队、绘画中、绘画完成、绘画失败") private String status; + @Schema(description = "是否发布") + private String publicStatus; + + @Schema(description = "图片地址(自己服务器)") + private String picUrl; + @Schema(description = "绘画图片地址(绘画好的服务器)") private String originalPicUrl; @Schema(description = "绘画错误信息") private String errorMessage; - @Schema(description = "是否发布") - private String publicStatus; + // ============ 绘画请求参数 - // TODO @fan:增加一个 Map 字段,drawRequest;用于记录请求模型的字段;对应的就是 ImageOptions - // TODO @fan:增加一个 Map 字段,记录 ImageResponseMetadata?这样 mjNonceId、mjOperationId、mjOperationName、mjOperations 这些字段,貌似可以收掉 + /** + * - style + */ + @Schema(description = "绘画请求参数") + private Map drawRequest; - // ============ mj 需要字段 - - @Schema(description = "用户操作的Nonce编号(MJ返回)") - private String mjNonceId; - - @Schema(description = "用户操作的操作编号(MJ返回)") - private String mjOperationId; - - @Schema(description = "用户操作的操作名字(MJ返回)") - private String mjOperationName; - - @Schema(description = "mj图片生产成功保存的 components json 数组") - private String mjOperations; + /** + * - mjNonceId + * - mjOperationId + * - mjOperationName + * - mjOperations + */ + @Schema(description = "绘画请求响应参数") + private Map drawResponse; }