-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStructs.go
More file actions
30 lines (25 loc) · 760 Bytes
/
Structs.go
File metadata and controls
30 lines (25 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package main
import "go.mongodb.org/mongo-driver/bson/primitive"
type UserStatus struct {
UserID int64
ContactPending bool
GameNamePending bool
GameName string
}
type MongoUser struct {
ID int64 `bson:"_id,omitempty"`
Name string `bson:"Name"`
Games []primitive.ObjectID `bson:"Games"`
}
type MongoPlayerScore struct {
Player int64 `bson:"Player"`
PlayerName string `bson:"PlayerName"`
Score uint32 `bson:"Score,minsize"`
WordNum uint `bson:"WordNum"`
}
type MongoGame struct {
Players []MongoPlayerScore `bson:"Players"`
Leader string `bson:"Leader"`
TotalScore uint32 `bson:"TotalScore,minsize"`
Name string `bson:"Name"`
}