From 56013d791b3d446706d94a36c332dd52f188c6a2 Mon Sep 17 00:00:00 2001 From: satori Date: Sat, 4 Jan 2025 18:44:34 +0800 Subject: [PATCH] =?UTF-8?q?games=20=E5=9B=BE=E7=89=87=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/game.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/game.go b/api/game.go index 3b3c369..8c8d489 100644 --- a/api/game.go +++ b/api/game.go @@ -33,6 +33,7 @@ type Game struct { CollectCount int `json:"collect_count" gorm:"column:collect_num"` PraiseCount int `json:"praise_count" gorm:"column:praise"` CommentCount int `json:"comment_count" gorm:"column:comment_num"` + ImageCount int `json:"image_count" gorm:"column:total_image_count"` TextCount int `json:"text_count" gorm:"column:text_count"` TextList []string `json:"text_list" gorm:"-"` CreateTime time.Time `json:"create_time"` @@ -68,6 +69,7 @@ var gameType = graphql.NewObject(graphql.ObjectConfig{ "collect": &graphql.Field{Type: graphql.Boolean, Description: "当前用户是否收藏"}, "praise_count": &graphql.Field{Type: graphql.Int, Description: "点赞数"}, "collect_count": &graphql.Field{Type: graphql.Int, Description: "收藏数"}, + "image_count": &graphql.Field{Type: graphql.Int, Description: "图片数"}, "text_count": &graphql.Field{Type: graphql.Int, Description: "文字数量"}, "text_list": &graphql.Field{Type: graphql.NewList(graphql.String), Description: "文字列表"}, "emoji1": &graphql.Field{Type: graphql.Int, Description: "表情1数量"},