Files
ai-agent/digital-human/model/dto/digitalhuman_dto.go
2026-06-10 15:29:21 +08:00

159 lines
7.5 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package dto
import (
"ai-agent/digital-human/consts"
"gitea.redpowerfuture.com/red-future/common/beans"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// CreateDigitalHumanReq 创建数字人形象请求
type CreateDigitalHumanReq struct {
g.Meta `path:"/createDigitalHuman" method:"post" tags:"数字人形象管理" summary:"创建数字人形象" dc:"创建新的数字人形象"`
// 基础信息
Name string `json:"name" v:"required" dc:"数字人名称"`
Description string `json:"description" dc:"数字人描述"`
ImageURL string `json:"imageUrl" dc:"形象图片URL"`
VideoURL string `json:"videoUrl" dc:"形象视频URL"`
Status consts.DigitalHumanStatus `json:"status" dc:"状态1启用/0停用" d:"1"`
Tags []string `json:"tags" dc:"标签"`
Gender consts.Gender `json:"gender" dc:"性别"`
Age consts.Age `json:"age" dc:"年龄段"`
Style consts.Style `json:"style" dc:"风格:商务/休闲/正式等"`
ExternalID string `json:"externalId" dc:"外部系统ID"`
Metadata []map[string]interface{} `json:"metadata" dc:"动态元数据"`
}
// CreateDigitalHumanRes 创建数字人形象响应
type CreateDigitalHumanRes struct {
Id int64 `json:"id" dc:"数字人形象ID"`
}
// ListDigitalHumanReq 获取数字人形象列表请求
type ListDigitalHumanReq struct {
g.Meta `path:"/listDigitalHumans" method:"get" tags:"数字人形象管理" summary:"获取数字人形象列表" dc:"分页查询数字人形象列表,支持多条件筛选"`
*beans.Page
Status consts.DigitalHumanStatus `json:"status" dc:"状态"`
Gender consts.Gender `json:"gender" dc:"性别"`
Style consts.Style `json:"style" dc:"风格"`
Keyword string `json:"keyword" dc:"关键词搜索"`
}
// ListDigitalHumanRes 获取数字人形象列表响应
type ListDigitalHumanRes struct {
List []*DigitalHumanListItem `json:"list" dc:"数字人形象列表"`
Total int64 `json:"total" dc:"总数"`
}
// DigitalHumanListItem 数字人形象列表项
type DigitalHumanListItem struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
ImageURL string `json:"imageUrl"`
VideoURL string `json:"videoUrl"`
Status consts.DigitalHumanStatus `json:"status"`
Tags []string `json:"tags"`
Gender consts.Gender `json:"gender"`
Age consts.Age `json:"age"`
Style consts.Style `json:"style"`
CreatedAt *gtime.Time `json:"createdAt"`
UpdatedAt *gtime.Time `json:"updatedAt"`
}
// GetDigitalHumanReq 获取数字人形象详情请求
type GetDigitalHumanReq struct {
g.Meta `path:"/getDigitalHuman" method:"get" tags:"数字人形象管理" summary:"获取数字人形象详情" dc:"获取数字人形象详情"`
ID int64 `json:"id" v:"required" dc:"数字人形象ID"`
}
// GetDigitalHumanRes 获取数字人形象详情响应
type GetDigitalHumanRes struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
ImageURL string `json:"imageUrl"`
VideoURL string `json:"videoUrl"`
Status consts.DigitalHumanStatus `json:"status"`
Tags []string `json:"tags"`
Gender consts.Gender `json:"gender"`
Age consts.Age `json:"age"`
Style consts.Style `json:"style"`
ExternalID string `json:"externalId"`
Metadata []map[string]interface{} `json:"metadata"`
CreatedAt *gtime.Time `json:"createdAt"`
UpdatedAt *gtime.Time `json:"updatedAt"`
}
// UpdateDigitalHumanReq 更新数字人形象请求
type UpdateDigitalHumanReq struct {
g.Meta `path:"/updateDigitalHuman" method:"put" tags:"数字人形象管理" summary:"更新数字人形象" dc:"更新数字人形象信息"`
ID int64 `json:"id" v:"required" dc:"数字人形象ID"`
// 基础信息
Name string `json:"name" dc:"数字人名称"`
Description string `json:"description" dc:"数字人描述"`
ImageURL string `json:"imageUrl" dc:"形象图片URL"`
VideoURL string `json:"videoUrl" dc:"形象视频URL"`
Status consts.DigitalHumanStatus `json:"status" dc:"状态1启用/0停用"`
Tags []string `json:"tags" dc:"标签"`
Gender consts.Gender `json:"gender" dc:"性别"`
Age consts.Age `json:"age" dc:"年龄段"`
Style consts.Style `json:"style" dc:"风格:商务/休闲/正式等"`
ExternalID string `json:"externalId" dc:"外部系统ID"`
Metadata []map[string]interface{} `json:"metadata" dc:"动态元数据"`
}
// UpdateDigitalHumanStatusReq 更新数字人形象状态请求
type UpdateDigitalHumanStatusReq struct {
g.Meta `path:"/updateDigitalHumanStatus" method:"put" tags:"数字人形象管理" summary:"更新数字人形象状态" dc:"更新数字人形象状态"`
ID int64 `json:"id" v:"required" dc:"数字人形象ID"`
Status consts.DigitalHumanStatus `json:"status" v:"required|in:1,0" dc:"状态1启用/0停用"`
}
// DeleteDigitalHumanReq 删除数字人形象请求
type DeleteDigitalHumanReq struct {
g.Meta `path:"/deleteDigitalHuman" method:"delete" tags:"数字人形象管理" summary:"删除数字人形象" dc:"删除数字人形象"`
ID int64 `json:"id" v:"required" dc:"数字人形象ID"`
}
// GetDigitalHumanStatusOptionsReq 获取数字人状态选项请求
type GetDigitalHumanStatusOptionsReq struct {
g.Meta `path:"/getDigitalHumanStatusOptions" method:"get" tags:"数字人形象管理" summary:"获取数字人状态选项" dc:"获取所有数字人状态的选项列表"`
}
// GetDigitalHumanStatusOptionsRes 获取数字人状态选项响应
type GetDigitalHumanStatusOptionsRes struct {
Options []consts.StatusKeyValue `json:"options" dc:"状态选项列表"`
}
// GetGenderOptionsReq 获取性别选项请求
type GetGenderOptionsReq struct {
g.Meta `path:"/getGenderOptions" method:"get" tags:"数字人形象管理" summary:"获取性别选项" dc:"获取所有性别选项列表"`
}
// GetGenderOptionsRes 获取性别选项响应
type GetGenderOptionsRes struct {
Options []consts.GenderKeyValue `json:"options" dc:"性别选项列表"`
}
// GetAgeOptionsReq 获取年龄段选项请求
type GetAgeOptionsReq struct {
g.Meta `path:"/getAgeOptions" method:"get" tags:"数字人形象管理" summary:"获取年龄段选项" dc:"获取所有年龄段选项列表"`
}
// GetAgeOptionsRes 获取年龄段选项响应
type GetAgeOptionsRes struct {
Options []consts.AgeKeyValue `json:"options" dc:"年龄段选项列表"`
}
// GetStyleOptionsReq 获取风格选项请求
type GetStyleOptionsReq struct {
g.Meta `path:"/getStyleOptions" method:"get" tags:"数字人形象管理" summary:"获取风格选项" dc:"获取所有风格选项列表"`
}
// GetStyleOptionsRes 获取风格选项响应
type GetStyleOptionsRes struct {
Options []consts.StyleKeyValue `json:"options" dc:"风格选项列表"`
}