【优化】调整 AI Image 增肌 draw rquest 和 response

This commit is contained in:
cherishsince 2024-05-29 10:19:22 +08:00
parent c7ee3dc2cd
commit 1b725fd517

View File

@ -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要不改成 widthheight更明确的尺寸
@Schema(description = "尺寸大小")
private String size;
@Schema(description = "图片宽度")
private String width;
// TODO @fanstyle 是所有模型都有么如果不是是不是靠 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<String, Object> 字段drawRequest用于记录请求模型的字段对应的就是 ImageOptions
// TODO @fan增加一个 Map<String, Object> 字段记录 ImageResponseMetadata这样 mjNonceIdmjOperationIdmjOperationNamemjOperations 这些字段貌似可以收掉
/**
* - style
*/
@Schema(description = "绘画请求参数")
private Map<String, Object> 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<String, Object> drawResponse;
}