增加 emoji 表情计数字段
This commit is contained in:
@@ -27,6 +27,11 @@ type Article struct {
|
||||
PraiseCount int `json:"praise_count" gorm:"column:praise_num"`
|
||||
CreateTime time.Time `json:"create_time" db:"create_time"`
|
||||
UpdateTime time.Time `json:"update_time" db:"update_time"`
|
||||
Emoji1 int `json:"emoji1"`
|
||||
Emoji2 int `json:"emoji2"`
|
||||
Emoji3 int `json:"emoji3"`
|
||||
Emoji4 int `json:"emoji4"`
|
||||
Emoji5 int `json:"emoji5"`
|
||||
}
|
||||
|
||||
func (Article) TableName() string {
|
||||
@@ -50,6 +55,11 @@ var articleType = 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: "收藏数"},
|
||||
"emoji1": &graphql.Field{Type: graphql.Int, Description: "表情1数量"},
|
||||
"emoji2": &graphql.Field{Type: graphql.Int, Description: "表情2数量"},
|
||||
"emoji3": &graphql.Field{Type: graphql.Int, Description: "表情3数量"},
|
||||
"emoji4": &graphql.Field{Type: graphql.Int, Description: "表情4数量"},
|
||||
"emoji5": &graphql.Field{Type: graphql.Int, Description: "表情5数量"},
|
||||
},
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user