增加 emoji 表情计数字段
This commit is contained in:
10
api/game.go
10
api/game.go
@@ -33,6 +33,11 @@ type Game struct {
|
||||
TextList []string `json:"text_list" gorm:"-"`
|
||||
CreateTime time.Time `json:"create_time"`
|
||||
UpdateTime time.Time `json:"update_time"`
|
||||
Emoji1 int `json:"emoji1"`
|
||||
Emoji2 int `json:"emoji2"`
|
||||
Emoji3 int `json:"emoji3"`
|
||||
Emoji4 int `json:"emoji4"`
|
||||
Emoji5 int `json:"emoji5"`
|
||||
}
|
||||
|
||||
func (Game) TableName() string {
|
||||
@@ -60,6 +65,11 @@ var gameType = graphql.NewObject(graphql.ObjectConfig{
|
||||
"collect_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数量"},
|
||||
"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