feat: align ids to int64

This commit is contained in:
2026-01-08 09:57:04 +08:00
parent a1de16bc01
commit d98f41f1ac
39 changed files with 298 additions and 339 deletions

View File

@@ -17,7 +17,7 @@ type LoginResponse struct {
}
type User struct {
ID string `json:"id"`
ID int64 `json:"id"`
Phone string `json:"phone"`
Nickname string `json:"nickname"`
Avatar string `json:"avatar"`

View File

@@ -3,7 +3,7 @@ package dto
import "quyun/v2/app/requests"
type UploadResult struct {
ID string `json:"id"`
ID int64 `json:"id"`
URL string `json:"url"`
Filename string `json:"filename"`
Size int64 `json:"size"`

View File

@@ -6,20 +6,20 @@ type ContentListFilter struct {
requests.Pagination
Keyword *string `query:"keyword"`
Genre *string `query:"genre"`
TenantID *string `query:"tenantId"`
TenantID *int64 `query:"tenantId"`
Sort *string `query:"sort"`
IsPinned *bool `query:"is_pinned"`
PriceType *string `query:"price_type"`
}
type ContentItem struct {
ID string `json:"id"`
ID int64 `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:"author_id"`
AuthorID int64 `json:"author_id"`
AuthorName string `json:"author_name"`
AuthorAvatar string `json:"author_avatar"`
AuthorIsFollowing bool `json:"author_is_following"`
@@ -52,24 +52,24 @@ type Meta struct {
}
type Comment struct {
ID string `json:"id"`
ID int64 `json:"id"`
Content string `json:"content"`
UserID string `json:"user_id"`
UserID int64 `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:"is_liked"`
ReplyTo string `json:"reply_to"`
ReplyTo int64 `json:"reply_to"`
}
type CommentCreateForm struct {
Content string `json:"content"`
ReplyTo string `json:"reply_to"`
ReplyTo int64 `json:"reply_to"`
}
type Topic struct {
ID string `json:"id"`
ID int64 `json:"id"`
Title string `json:"title"`
Cover string `json:"cover"`
Tag string `json:"tag"`

View File

@@ -1,8 +1,8 @@
package dto
type UserCouponItem struct {
ID string `json:"id"`
CouponID string `json:"coupon_id"`
ID int64 `json:"id"`
CouponID int64 `json:"coupon_id"`
Title string `json:"title"`
Description string `json:"description"`
Type string `json:"type"`

View File

@@ -26,13 +26,13 @@ type FloatStatItem struct {
}
type ContentCreateForm struct {
Title string `json:"title"`
Genre string `json:"genre"`
Key string `json:"key"`
Price float64 `json:"price"`
Status string `json:"status"`
CoverIDs []string `json:"cover_ids"`
MediaIDs []string `json:"media_ids"`
Title string `json:"title"`
Genre string `json:"genre"`
Key string `json:"key"`
Price float64 `json:"price"`
Status string `json:"status"`
CoverIDs []int64 `json:"cover_ids"`
MediaIDs []int64 `json:"media_ids"`
}
type ContentUpdateForm struct {
@@ -42,12 +42,12 @@ type ContentUpdateForm struct {
Price *float64 `json:"price"`
Status string `json:"status"`
IsPinned *bool `json:"is_pinned"`
CoverIDs []string `json:"cover_ids"`
MediaIDs []string `json:"media_ids"`
CoverIDs []int64 `json:"cover_ids"`
MediaIDs []int64 `json:"media_ids"`
}
type ContentEditDTO struct {
ID string `json:"id"`
ID int64 `json:"id"`
Title string `json:"title"`
Genre string `json:"genre"`
Key string `json:"key"`
@@ -60,7 +60,7 @@ type ContentEditDTO struct {
}
type CreatorContentItem struct {
ID string `json:"id"`
ID int64 `json:"id"`
Title string `json:"title"`
Genre string `json:"genre"`
Key string `json:"key"`
@@ -79,7 +79,7 @@ type CreatorContentItem struct {
}
type AssetDTO struct {
ID string `json:"id"`
ID int64 `json:"id"`
Role string `json:"role"`
Type string `json:"type"`
URL string `json:"url"`
@@ -110,7 +110,7 @@ type RefundForm struct {
}
type Settings struct {
ID string `json:"id"`
ID int64 `json:"id"`
Name string `json:"name"`
Bio string `json:"bio"`
Avatar string `json:"avatar"`
@@ -119,7 +119,7 @@ type Settings struct {
}
type PayoutAccount struct {
ID string `json:"id"`
ID int64 `json:"id"`
Type string `json:"type"` // bank, alipay
Name string `json:"name"`
Account string `json:"account"`
@@ -129,5 +129,5 @@ type PayoutAccount struct {
type WithdrawForm struct {
Amount float64 `json:"amount"`
Method string `json:"method"` // wallet, external
AccountID string `json:"account_id"`
AccountID int64 `json:"account_id"`
}

View File

@@ -1,14 +1,14 @@
package dto
type OrderCreateForm struct {
ContentID string `json:"content_id"`
ContentID int64 `json:"content_id"`
Sku string `json:"sku"`
Quantity int `json:"quantity"`
UserCouponID string `json:"user_coupon_id"`
UserCouponID int64 `json:"user_coupon_id"`
}
type OrderCreateResponse struct {
OrderID string `json:"order_id"`
OrderID int64 `json:"order_id"`
}
type OrderPayForm struct {

View File

@@ -9,7 +9,7 @@ type TenantListFilter struct {
}
type TenantProfile struct {
ID string `json:"id"`
ID int64 `json:"id"`
Name string `json:"name"`
Avatar string `json:"avatar"`
Cover string `json:"cover"`

View File

@@ -22,7 +22,7 @@ type WalletResponse struct {
}
type Transaction struct {
ID string `json:"id"`
ID int64 `json:"id"`
Title string `json:"title"`
Amount float64 `json:"amount"`
Type string `json:"type"` // income, expense
@@ -40,7 +40,7 @@ type RechargeResponse struct {
}
type Order struct {
ID string `json:"id"`
ID int64 `json:"id"`
Type string `json:"type"` // consts.OrderType...
TypeDescription string `json:"type_description"`
CreateTime string `json:"create_time"`
@@ -50,7 +50,7 @@ type Order struct {
Amount float64 `json:"amount"`
Quantity int `json:"quantity"`
Items []ContentItem `json:"items"`
TenantID string `json:"tenant_id"`
TenantID int64 `json:"tenant_id"`
TenantName string `json:"tenant_name"`
IsVirtual bool `json:"is_virtual"`
BuyerName string `json:"buyer_name"`
@@ -60,7 +60,7 @@ type Order struct {
}
type Notification struct {
ID string `json:"id"`
ID int64 `json:"id"`
Type string `json:"type"`
Title string `json:"title"`
Content string `json:"content"`