2019-01-27 09:53:34 +08:00
|
|
|
package main
|
|
|
|
|
2019-09-28 23:01:36 +08:00
|
|
|
// String pointer means nullable
|
|
|
|
|
2019-10-06 23:20:06 +08:00
|
|
|
type UpdateMsg struct {
|
2019-10-23 13:49:43 +08:00
|
|
|
Type string `json:"type"`
|
|
|
|
Data string `json:"data"`
|
2019-10-06 23:20:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type Contact struct {
|
2019-10-23 13:49:43 +08:00
|
|
|
UserA string `json:"usera"` // First user ID
|
|
|
|
UserB string `json:"userb"` // Second user ID
|
2019-10-06 23:20:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type Member struct {
|
2019-10-23 13:49:43 +08:00
|
|
|
User string `json:"user"`
|
|
|
|
Conversation string `json:"conversation"`
|
|
|
|
Pinned bool `json:"pinned"`
|
2019-10-06 23:20:06 +08:00
|
|
|
}
|
|
|
|
|
2019-01-27 09:53:34 +08:00
|
|
|
type Conversation struct {
|
2019-07-02 23:31:37 +08:00
|
|
|
ID string `json:"id"` // id
|
|
|
|
Title string `json:"title"` // title
|
2019-08-31 12:32:22 +08:00
|
|
|
DM bool `json:"dm"` // dm
|
|
|
|
Picture string `json:"picture"` // picture
|
|
|
|
Pinned bool `json:"pinned"` // pinned
|
2019-01-27 09:53:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type User struct {
|
2019-09-28 23:01:36 +08:00
|
|
|
ID string `json:"id"` // id
|
|
|
|
Username *string `json:"username"` // username
|
|
|
|
Bio string `json:"bio"` // bio
|
|
|
|
ProfilePic string `json:"profile_pic"` // profile_pic
|
|
|
|
FirstName string `json:"first_name"` // first_name
|
|
|
|
LastName string `json:"last_name"` // last_name
|
|
|
|
PhoneNumber string `json:"phone_number"` // phone_number
|
2019-01-27 09:53:34 +08:00
|
|
|
}
|
2019-08-04 13:19:07 +08:00
|
|
|
|
|
|
|
type PhoneNumber struct {
|
|
|
|
PhoneNumber string `json:"phone_number"`
|
|
|
|
}
|