feat: 统一字段命名风格,使用下划线格式替代驼峰式命名
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package dto
|
||||
|
||||
import "quyun/v2/app/requests"
|
||||
|
||||
type ContentItem struct {
|
||||
ID string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
@@ -9,22 +7,22 @@ type ContentItem struct {
|
||||
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"`
|
||||
AuthorID string `json:"author_id"`
|
||||
AuthorName string `json:"author_name"`
|
||||
AuthorAvatar string `json:"author_avatar"`
|
||||
Views int `json:"views"`
|
||||
Likes int `json:"likes"`
|
||||
IsPurchased bool `json:"isPurchased"`
|
||||
IsPurchased bool `json:"is_purchased"`
|
||||
}
|
||||
|
||||
type ContentDetail struct {
|
||||
ContentItem
|
||||
Description string `json:"description"`
|
||||
Body string `json:"body"`
|
||||
MediaUrls []MediaURL `json:"mediaUrls"`
|
||||
MediaUrls []MediaURL `json:"media_urls"`
|
||||
Meta Meta `json:"meta"`
|
||||
IsLiked bool `json:"isLiked"`
|
||||
IsFavorited bool `json:"isFavorited"`
|
||||
IsLiked bool `json:"is_liked"`
|
||||
IsFavorited bool `json:"is_favorited"`
|
||||
}
|
||||
|
||||
type MediaURL struct {
|
||||
@@ -42,18 +40,18 @@ type Meta struct {
|
||||
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"`
|
||||
UserID string `json:"user_id"`
|
||||
UserNickname string `json:"user_nickname"`
|
||||
UserAvatar string `json:"user_avatar"`
|
||||
CreateTime string `json:"create_time"`
|
||||
Likes int `json:"likes"`
|
||||
IsLiked bool `json:"isLiked"`
|
||||
ReplyTo string `json:"replyTo"`
|
||||
IsLiked bool `json:"is_liked"`
|
||||
ReplyTo string `json:"reply_to"`
|
||||
}
|
||||
|
||||
type CommentCreateForm struct {
|
||||
Content string `json:"content"`
|
||||
ReplyTo string `json:"replyTo"`
|
||||
ReplyTo string `json:"reply_to"`
|
||||
}
|
||||
|
||||
type Topic struct {
|
||||
@@ -66,9 +64,9 @@ type Topic struct {
|
||||
|
||||
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"`
|
||||
}
|
||||
PriceAmount float64 `json:"price_amount"`
|
||||
DiscountType string `json:"discount_type"`
|
||||
DiscountValue float64 `json:"discount_value"`
|
||||
DiscountStartAt string `json:"discount_start_at"`
|
||||
DiscountEndAt string `json:"discount_end_at"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user