fix: int64 ID 字段序列化为 JSON string

This commit is contained in:
zetaloop
2026-05-03 05:54:48 +08:00
parent 83fa982749
commit cf639f1bca
22 changed files with 86 additions and 82 deletions
+3 -3
View File
@@ -7,12 +7,12 @@ type (
Id int64 `path:"id"`
}
Post {
Id int64 `json:"id"`
Id int64 `json:"id,string"`
Title string `json:"title"`
Content string `json:"content"`
Images []string `json:"images"`
Tags []string `json:"tags"`
LinkedOrderId int64 `json:"linkedOrderId,optional"`
LinkedOrderId int64 `json:"linkedOrderId,string,optional"`
Pinned bool `json:"pinned"`
LikeCount int64 `json:"likeCount"`
CommentCount int64 `json:"commentCount"`
@@ -37,7 +37,7 @@ type (
Meta PageMeta `json:"meta"`
}
Comment {
Id int64 `json:"id"`
Id int64 `json:"id,string"`
Content string `json:"content"`
Author UserProfile `json:"author"`
LikeCount int64 `json:"likeCount"`