74 lines
2.0 KiB
Go
74 lines
2.0 KiB
Go
package dto
|
|
|
|
import "quyun/v2/app/requests"
|
|
|
|
type ContentItem struct {
|
|
ID string `json:"id"`
|
|
Title string `json:"title"`
|
|
Cover string `json:"cover"`
|
|
Genre string `json:"genre"`
|
|
Type string `json:"type"` // video, audio, article
|
|
Price float64 `json:"price"`
|
|
AuthorID string `json:"authorId"`
|
|
AuthorName string `json:"authorName"`
|
|
AuthorAvatar string `json:"authorAvatar"`
|
|
Views int `json:"views"`
|
|
Likes int `json:"likes"`
|
|
IsPurchased bool `json:"isPurchased"`
|
|
}
|
|
|
|
type ContentDetail struct {
|
|
ContentItem
|
|
Description string `json:"description"`
|
|
Body string `json:"body"`
|
|
MediaUrls []MediaURL `json:"mediaUrls"`
|
|
Meta Meta `json:"meta"`
|
|
IsLiked bool `json:"isLiked"`
|
|
IsFavorited bool `json:"isFavorited"`
|
|
}
|
|
|
|
type MediaURL struct {
|
|
Type string `json:"type"`
|
|
URL string `json:"url"`
|
|
Duration int `json:"duration"`
|
|
}
|
|
|
|
type Meta struct {
|
|
Role string `json:"role"`
|
|
Key string `json:"key"`
|
|
Beat string `json:"beat"`
|
|
}
|
|
|
|
type Comment struct {
|
|
ID string `json:"id"`
|
|
Content string `json:"content"`
|
|
UserID string `json:"userId"`
|
|
UserNickname string `json:"userNickname"`
|
|
UserAvatar string `json:"userAvatar"`
|
|
CreateTime string `json:"createTime"`
|
|
Likes int `json:"likes"`
|
|
IsLiked bool `json:"isLiked"`
|
|
ReplyTo string `json:"replyTo"`
|
|
}
|
|
|
|
type CommentCreateForm struct {
|
|
Content string `json:"content"`
|
|
ReplyTo string `json:"replyTo"`
|
|
}
|
|
|
|
type Topic struct {
|
|
ID string `json:"id"`
|
|
Title string `json:"title"`
|
|
Cover string `json:"cover"`
|
|
Tag string `json:"tag"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type ContentPrice struct {
|
|
Currency string `json:"currency"`
|
|
PriceAmount float64 `json:"priceAmount"`
|
|
DiscountType string `json:"discountType"`
|
|
DiscountValue float64 `json:"discountValue"`
|
|
DiscountStartAt string `json:"discountStartAt"`
|
|
DiscountEndAt string `json:"discountEndAt"`
|
|
} |