add db function for user connections
This commit is contained in:
+14
-6
@@ -14,9 +14,17 @@ type User struct {
|
||||
WsConn *websocket.Conn
|
||||
Id uint32
|
||||
Groups map[uint32]struct{}
|
||||
Connections map[uint32]*Connection
|
||||
Color [3]uint8
|
||||
}
|
||||
|
||||
type Connection struct {
|
||||
CreatedAt time.Time
|
||||
With uint32
|
||||
IsFromUser bool
|
||||
IsAccepted bool
|
||||
}
|
||||
|
||||
type Group struct {
|
||||
Name string
|
||||
CreatedAt time.Time
|
||||
@@ -29,11 +37,11 @@ type Group struct {
|
||||
}
|
||||
|
||||
type GroupNoMembers struct {
|
||||
Name string `json:"name"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
Id uint32 `json:"id"`
|
||||
CreatorId uint32 `json:"creatorId"`
|
||||
OwnerId uint32 `json:"ownerId"`
|
||||
Color [3]uint8 `json:"color"`
|
||||
Name string `json:"name"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
Id uint32 `json:"id"`
|
||||
CreatorId uint32 `json:"creatorId"`
|
||||
OwnerId uint32 `json:"ownerId"`
|
||||
Color [3]uint8 `json:"color"`
|
||||
EnableUsersColors bool `json:"enableUsersColors"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user