chore: document v1 dto fields
This commit is contained in:
@@ -3,131 +3,216 @@ package dto
|
||||
import "quyun/v2/app/requests"
|
||||
|
||||
type ApplyForm struct {
|
||||
Name string `json:"name"`
|
||||
Bio string `json:"bio"`
|
||||
// Name 频道/创作者名称。
|
||||
Name string `json:"name"`
|
||||
// Bio 频道简介。
|
||||
Bio string `json:"bio"`
|
||||
// Avatar 头像URL。
|
||||
Avatar string `json:"avatar"`
|
||||
}
|
||||
|
||||
type DashboardStats struct {
|
||||
TotalFollowers IntStatItem `json:"total_followers"`
|
||||
TotalRevenue FloatStatItem `json:"total_revenue"`
|
||||
PendingRefunds int `json:"pending_refunds"`
|
||||
NewMessages int `json:"new_messages"`
|
||||
// TotalFollowers 粉丝总数统计。
|
||||
TotalFollowers IntStatItem `json:"total_followers"`
|
||||
// TotalRevenue 累计收入统计(单位元)。
|
||||
TotalRevenue FloatStatItem `json:"total_revenue"`
|
||||
// PendingRefunds 待处理退款数量。
|
||||
PendingRefunds int `json:"pending_refunds"`
|
||||
// NewMessages 新消息数量。
|
||||
NewMessages int `json:"new_messages"`
|
||||
}
|
||||
|
||||
type IntStatItem struct {
|
||||
Value int `json:"value"`
|
||||
// Value 统计数值。
|
||||
Value int `json:"value"`
|
||||
// Trend 环比/同比变化比例。
|
||||
Trend float64 `json:"trend"`
|
||||
}
|
||||
|
||||
type FloatStatItem struct {
|
||||
// Value 统计数值(浮点)。
|
||||
Value float64 `json:"value"`
|
||||
// Trend 环比/同比变化比例。
|
||||
Trend float64 `json:"trend"`
|
||||
}
|
||||
|
||||
type ContentCreateForm struct {
|
||||
Title string `json:"title"`
|
||||
Genre string `json:"genre"`
|
||||
Key string `json:"key"`
|
||||
Price float64 `json:"price"`
|
||||
Status string `json:"status"`
|
||||
// Title 内容标题。
|
||||
Title string `json:"title"`
|
||||
// Genre 内容分类/风格。
|
||||
Genre string `json:"genre"`
|
||||
// Key 音乐调性或主音。
|
||||
Key string `json:"key"`
|
||||
// Price 价格(单位元)。
|
||||
Price float64 `json:"price"`
|
||||
// Status 内容状态(draft/published)。
|
||||
Status string `json:"status"`
|
||||
// CoverIDs 封面资源ID集合。
|
||||
CoverIDs []int64 `json:"cover_ids"`
|
||||
// MediaIDs 媒体资源ID集合(音频/视频/图片)。
|
||||
MediaIDs []int64 `json:"media_ids"`
|
||||
}
|
||||
|
||||
type ContentUpdateForm struct {
|
||||
Title string `json:"title"`
|
||||
Genre string `json:"genre"`
|
||||
Key string `json:"key"`
|
||||
Price *float64 `json:"price"`
|
||||
Status string `json:"status"`
|
||||
IsPinned *bool `json:"is_pinned"`
|
||||
CoverIDs []int64 `json:"cover_ids"`
|
||||
MediaIDs []int64 `json:"media_ids"`
|
||||
// Title 内容标题(为空表示不修改)。
|
||||
Title string `json:"title"`
|
||||
// Genre 内容分类/风格。
|
||||
Genre string `json:"genre"`
|
||||
// Key 音乐调性或主音。
|
||||
Key string `json:"key"`
|
||||
// Price 价格(单位元,nil 表示不修改)。
|
||||
Price *float64 `json:"price"`
|
||||
// Status 内容状态(draft/published)。
|
||||
Status string `json:"status"`
|
||||
// IsPinned 是否置顶。
|
||||
IsPinned *bool `json:"is_pinned"`
|
||||
// CoverIDs 封面资源ID集合。
|
||||
CoverIDs []int64 `json:"cover_ids"`
|
||||
// MediaIDs 媒体资源ID集合。
|
||||
MediaIDs []int64 `json:"media_ids"`
|
||||
}
|
||||
|
||||
type ContentEditDTO struct {
|
||||
ID int64 `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Genre string `json:"genre"`
|
||||
Key string `json:"key"`
|
||||
Description string `json:"description"`
|
||||
Status string `json:"status"`
|
||||
Price float64 `json:"price"`
|
||||
EnableTrial bool `json:"enable_trial"`
|
||||
PreviewSeconds int `json:"preview_seconds"`
|
||||
Assets []AssetDTO `json:"assets"`
|
||||
// ID 内容ID。
|
||||
ID int64 `json:"id"`
|
||||
// Title 内容标题。
|
||||
Title string `json:"title"`
|
||||
// Genre 内容分类。
|
||||
Genre string `json:"genre"`
|
||||
// Key 音乐调性或主音。
|
||||
Key string `json:"key"`
|
||||
// Description 内容简介。
|
||||
Description string `json:"description"`
|
||||
// Status 内容状态。
|
||||
Status string `json:"status"`
|
||||
// Price 价格(单位元)。
|
||||
Price float64 `json:"price"`
|
||||
// EnableTrial 是否开启试读/试听。
|
||||
EnableTrial bool `json:"enable_trial"`
|
||||
// PreviewSeconds 试看/试听秒数。
|
||||
PreviewSeconds int `json:"preview_seconds"`
|
||||
// Assets 资源列表(封面/媒体)。
|
||||
Assets []AssetDTO `json:"assets"`
|
||||
}
|
||||
|
||||
type CreatorContentItem struct {
|
||||
ID int64 `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Genre string `json:"genre"`
|
||||
Key string `json:"key"`
|
||||
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"`
|
||||
Visibility string `json:"visibility"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
IsPinned bool `json:"is_pinned"`
|
||||
IsPurchased bool `json:"is_purchased"`
|
||||
// ID 内容ID。
|
||||
ID int64 `json:"id"`
|
||||
// Title 内容标题。
|
||||
Title string `json:"title"`
|
||||
// Genre 内容分类。
|
||||
Genre string `json:"genre"`
|
||||
// Key 音乐调性或主音。
|
||||
Key string `json:"key"`
|
||||
// Price 价格(单位元)。
|
||||
Price float64 `json:"price"`
|
||||
// Views 浏览量。
|
||||
Views int `json:"views"`
|
||||
// Likes 点赞数。
|
||||
Likes int `json:"likes"`
|
||||
// Cover 封面URL。
|
||||
Cover string `json:"cover"`
|
||||
// ImageCount 图片素材数量。
|
||||
ImageCount int `json:"image_count"`
|
||||
// VideoCount 视频素材数量。
|
||||
VideoCount int `json:"video_count"`
|
||||
// AudioCount 音频素材数量。
|
||||
AudioCount int `json:"audio_count"`
|
||||
// Status 内容状态。
|
||||
Status string `json:"status"`
|
||||
// Visibility 可见性。
|
||||
Visibility string `json:"visibility"`
|
||||
// CreatedAt 创建时间(RFC3339)。
|
||||
CreatedAt string `json:"created_at"`
|
||||
// IsPinned 是否置顶。
|
||||
IsPinned bool `json:"is_pinned"`
|
||||
// IsPurchased 是否已购买。
|
||||
IsPurchased bool `json:"is_purchased"`
|
||||
}
|
||||
|
||||
type AssetDTO struct {
|
||||
ID int64 `json:"id"`
|
||||
// ID 资源ID。
|
||||
ID int64 `json:"id"`
|
||||
// Role 资源角色(cover/media/preview)。
|
||||
Role string `json:"role"`
|
||||
// Type 资源类型(image/audio/video)。
|
||||
Type string `json:"type"`
|
||||
URL string `json:"url"`
|
||||
// URL 资源访问地址。
|
||||
URL string `json:"url"`
|
||||
// Name 文件名。
|
||||
Name string `json:"name"`
|
||||
// Size 文件大小描述。
|
||||
Size string `json:"size"`
|
||||
Sort int `json:"sort"`
|
||||
// Sort 排序权重。
|
||||
Sort int `json:"sort"`
|
||||
}
|
||||
|
||||
type CreatorContentListFilter struct {
|
||||
// Pagination 分页参数(page/limit)。
|
||||
requests.Pagination
|
||||
Status *string `query:"status"`
|
||||
// Status 内容状态过滤。
|
||||
Status *string `query:"status"`
|
||||
// Visibility 可见性过滤。
|
||||
Visibility *string `query:"visibility"`
|
||||
Genre *string `query:"genre"`
|
||||
Key *string `query:"key"`
|
||||
Keyword *string `query:"keyword"`
|
||||
Sort *string `query:"sort"`
|
||||
// Genre 分类筛选。
|
||||
Genre *string `query:"genre"`
|
||||
// Key 调性筛选。
|
||||
Key *string `query:"key"`
|
||||
// Keyword 关键词搜索(标题/简介)。
|
||||
Keyword *string `query:"keyword"`
|
||||
// Sort 排序规则。
|
||||
Sort *string `query:"sort"`
|
||||
}
|
||||
|
||||
type CreatorOrderListFilter struct {
|
||||
// Pagination 分页参数(page/limit)。
|
||||
requests.Pagination
|
||||
Status *string `query:"status"`
|
||||
// Status 订单状态过滤。
|
||||
Status *string `query:"status"`
|
||||
// Keyword 关键词搜索(订单号/内容标题)。
|
||||
Keyword *string `query:"keyword"`
|
||||
}
|
||||
|
||||
type RefundForm struct {
|
||||
Action string `json:"action"` // accept, reject
|
||||
// Action 处理动作(accept/reject)。
|
||||
Action string `json:"action"`
|
||||
// Reason 退款原因/备注。
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
type Settings struct {
|
||||
ID int64 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Bio string `json:"bio"`
|
||||
Avatar string `json:"avatar"`
|
||||
Cover string `json:"cover"`
|
||||
// ID 租户/频道ID。
|
||||
ID int64 `json:"id"`
|
||||
// Name 频道名称。
|
||||
Name string `json:"name"`
|
||||
// Bio 频道简介。
|
||||
Bio string `json:"bio"`
|
||||
// Avatar 头像URL。
|
||||
Avatar string `json:"avatar"`
|
||||
// Cover 封面图URL。
|
||||
Cover string `json:"cover"`
|
||||
// Description 详细描述。
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
type PayoutAccount struct {
|
||||
ID int64 `json:"id"`
|
||||
Type string `json:"type"` // bank, alipay
|
||||
Name string `json:"name"`
|
||||
Account string `json:"account"`
|
||||
// ID 收款账户ID。
|
||||
ID int64 `json:"id"`
|
||||
// Type 账户类型(bank/alipay)。
|
||||
Type string `json:"type"`
|
||||
// Name 账户名称/开户行。
|
||||
Name string `json:"name"`
|
||||
// Account 收款账号。
|
||||
Account string `json:"account"`
|
||||
// Realname 收款人姓名。
|
||||
Realname string `json:"realname"`
|
||||
}
|
||||
|
||||
type WithdrawForm struct {
|
||||
Amount float64 `json:"amount"`
|
||||
Method string `json:"method"` // wallet, external
|
||||
AccountID int64 `json:"account_id"`
|
||||
// Amount 提现金额(单位元)。
|
||||
Amount float64 `json:"amount"`
|
||||
// Method 提现方式(wallet/external)。
|
||||
Method string `json:"method"`
|
||||
// AccountID 收款账户ID。
|
||||
AccountID int64 `json:"account_id"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user