3D生成服务已经完成

This commit is contained in:
GeekMaster
2025-09-02 18:55:45 +08:00
parent 85b4cc0a3c
commit f8e4d2880f
40 changed files with 4920 additions and 395 deletions

View File

@@ -0,0 +1,23 @@
package model
import "time"
type AI3DJob struct {
Id uint `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
UserId uint `gorm:"column:user_id;type:int(11);not null;comment:用户ID" json:"user_id"`
Type string `gorm:"column:type;type:varchar(20);not null;comment:API类型 (tencent/gitee)" json:"type"`
Power int `gorm:"column:power;type:int(11);not null;comment:消耗算力" json:"power"`
TaskId string `gorm:"column:task_id;type:varchar(100);comment:第三方任务ID" json:"task_id"`
FileURL string `gorm:"column:file_url;type:varchar(1024);comment:生成的3D模型文件地址" json:"file_url"`
PreviewURL string `gorm:"column:preview_url;type:varchar(1024);comment:预览图片地址" json:"preview_url"`
Model string `gorm:"column:model;type:varchar(50);comment:使用的3D模型类型" json:"model"`
Status string `gorm:"column:status;type:varchar(20);not null;default:pending;comment:任务状态" json:"status"`
ErrMsg string `gorm:"column:err_msg;type:varchar(1024);comment:错误信息" json:"err_msg"`
Params string `gorm:"column:params;type:text;comment:任务参数(JSON格式)" json:"params"`
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;not null" json:"updated_at"`
}
func (m *AI3DJob) TableName() string {
return "geekai_3d_jobs"
}

32
api/store/vo/ai3d_job.go Normal file
View File

@@ -0,0 +1,32 @@
package vo
type AI3DJob struct {
Id uint `json:"id"`
UserId uint `json:"user_id"`
Type string `json:"type"`
Power int `json:"power"`
TaskId string `json:"task_id"`
ImgURL string `json:"img_url"`
PreviewURL string `json:"preview_url"`
Model string `json:"model"`
Status string `json:"status"`
ErrMsg string `json:"err_msg"`
Params string `json:"params"`
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
type AI3DJobCreate struct {
Type string `json:"type" binding:"required"` // API类型 (tencent/gitee)
Model string `json:"model" binding:"required"` // 3D模型类型
Prompt string `json:"prompt"` // 文本提示词
ImageURL string `json:"image_url"` // 输入图片URL
Power int `json:"power" binding:"required"` // 消耗算力
}
type ThreeDJobList struct {
Page int `json:"page"`
PageSize int `json:"page_size"`
Total int `json:"total"`
List []AI3DJob `json:"list"`
}