+43
@@ -0,0 +1,43 @@
|
||||
package aiimagetovideodata
|
||||
|
||||
import "91porn-server/models/v/aiimagetovideomod"
|
||||
|
||||
// FormatAppDataList 格式化app列表数据
|
||||
func FormatAppDataList(origin []aiimagetovideomod.AiImageToVideo) (res []*aiimagetovideomod.AiImageToVideoInfo) {
|
||||
res = make([]*aiimagetovideomod.AiImageToVideoInfo, len(origin))
|
||||
if len(origin) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
// 组装返回数据
|
||||
for i, item := range origin {
|
||||
res[i] = FormatAppData(item)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// FormatAppData 格式化app数据
|
||||
func FormatAppData(item aiimagetovideomod.AiImageToVideo) (res *aiimagetovideomod.AiImageToVideoInfo) {
|
||||
if item.ID.IsZero() {
|
||||
return
|
||||
}
|
||||
|
||||
// 组装返回数据
|
||||
res = &aiimagetovideomod.AiImageToVideoInfo{
|
||||
ID: item.ID,
|
||||
UID: item.UID,
|
||||
ImgUrl: item.ImgUrl,
|
||||
NewImgUrl: item.NewImgUrl,
|
||||
Status: item.Status,
|
||||
Coin: item.Coin,
|
||||
IsFreeTimes: item.IsFreeTimes,
|
||||
IsHide: item.IsHide,
|
||||
Remark: item.Remark,
|
||||
IsDelete: item.IsDelete,
|
||||
CreatedAt: item.CreatedAt,
|
||||
UpdatedAt: item.UpdatedAt,
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user