+49
@@ -0,0 +1,49 @@
|
||||
package aitexttonoveldata
|
||||
|
||||
import "91porn-server/models/v/aitexttonovelmod"
|
||||
|
||||
// FormatAppDataList 格式化app列表数据
|
||||
func FormatAppDataList(origin []aitexttonovelmod.AiTextToNovel) (res []*aitexttonovelmod.AiTextToNovel) {
|
||||
res = make([]*aitexttonovelmod.AiTextToNovel, len(origin))
|
||||
if len(origin) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
// 组装返回数据
|
||||
for i, item := range origin {
|
||||
res[i] = FormatAppData(item)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// FormatAppData 格式化app数据
|
||||
func FormatAppData(item aitexttonovelmod.AiTextToNovel) (res *aitexttonovelmod.AiTextToNovel) {
|
||||
if item.ID.IsZero() {
|
||||
return
|
||||
}
|
||||
|
||||
// 组装返回数据
|
||||
res = &aitexttonovelmod.AiTextToNovel{
|
||||
ID: item.ID,
|
||||
UID: item.UID,
|
||||
Description: item.Description,
|
||||
Content: item.Content,
|
||||
Status: item.Status,
|
||||
CharacterSetting: item.CharacterSetting,
|
||||
LocationScene: item.LocationScene,
|
||||
Details: item.Details,
|
||||
ModelType: item.ModelType,
|
||||
Coin: item.Coin,
|
||||
DebitAmountCoin: item.DebitAmountCoin,
|
||||
DebitIncomeCoin: item.DebitIncomeCoin,
|
||||
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