feat: 更新内容管理功能,支持价格为可选字段,添加状态管理及媒体计数显示

This commit is contained in:
2026-01-04 19:56:53 +08:00
parent 581cbc3991
commit 4b32e64d35
3 changed files with 106 additions and 26 deletions

View File

@@ -38,7 +38,8 @@ type ContentUpdateForm struct {
Title string `json:"title"`
Genre string `json:"genre"`
Key string `json:"key"`
Price float64 `json:"price"`
Price *float64 `json:"price"`
Status string `json:"status"`
CoverIDs []string `json:"cover_ids"`
MediaIDs []string `json:"media_ids"`
}
@@ -64,6 +65,11 @@ type CreatorContentItem struct {
Price float64 `json:"price"`
Views int `json:"views"`
Likes int `json:"likes"`
Cover string `json:"cover"`
ImageCount int `json:"image_count"`
VideoCount int `json:"video_count"`
AudioCount int `json:"audio_count"`
Status string `json:"status"`
IsPurchased bool `json:"is_purchased"`
}