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
@@ -4,7 +4,7 @@
package types
type Comment struct {
Id int64 `json:"id"`
Id int64 `json:"id,string"`
Content string `json:"content"`
Author UserProfile `json:"author"`
LikeCount int64 `json:"likeCount"`
@@ -54,12 +54,12 @@ type PathId struct {
}
type Post struct {
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"`