From bf678b7440e7232db55790356f8649cbc8c8f39c Mon Sep 17 00:00:00 2001 From: satori Date: Sat, 4 Jan 2025 19:01:27 +0800 Subject: [PATCH] =?UTF-8?q?works=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/work.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/work.go b/api/work.go index ac442f1..e7c1cc8 100644 --- a/api/work.go +++ b/api/work.go @@ -30,6 +30,7 @@ type Work struct { Praise bool `json:"praise" gorm:"column:is_praise"` CollectCount int `json:"collect_count" gorm:"column:collect_num"` PraiseCount int `json:"praise_count" gorm:"column:praise"` + ImageCount int `json:"image_count" gorm:"column:total_image_count"` CreateTime time.Time `json:"create_time"` UpdateTime time.Time `json:"update_time"` Emoji1 int `json:"emoji1"` @@ -58,6 +59,7 @@ var workType = 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: "图片数"}, "emoji1": &graphql.Field{Type: graphql.Int, Description: "表情1数量"}, "emoji2": &graphql.Field{Type: graphql.Int, Description: "表情2数量"}, "emoji3": &graphql.Field{Type: graphql.Int, Description: "表情3数量"},