54 lines
1.1 KiB
Go
54 lines
1.1 KiB
Go
package structs
|
|
|
|
const (
|
|
LenUserId = 36
|
|
LenXAuthorizationToken = 36
|
|
)
|
|
|
|
// Representation of the user model
|
|
// TABLE users
|
|
type User struct {
|
|
Id string
|
|
Username string
|
|
AccountName string
|
|
AccountNameLc string
|
|
Email string
|
|
Password string
|
|
Description string
|
|
Latitude float64
|
|
Longitude float64
|
|
ParticipatingEvents []string
|
|
VisitedEvents []string
|
|
Notifications []string
|
|
Privacy UserPrivacy
|
|
XpLevel int
|
|
XpPoints int
|
|
FollowersCount int
|
|
FollowingCount int
|
|
AccountStatus uint8
|
|
AvatarUrl string
|
|
CreatedAt int64
|
|
UpdatedAt int64
|
|
}
|
|
|
|
type UserPrivacy struct {
|
|
Test uint8
|
|
}
|
|
|
|
// TABLE sessions
|
|
type UserSession struct {
|
|
Id string
|
|
UserId string
|
|
FcmToken string
|
|
UserAgent string
|
|
AppVersion string
|
|
Ip string
|
|
LastUsed int64
|
|
CreatedAt int64
|
|
}
|
|
|
|
// swagger:model UpdatedUserAvatarResponse
|
|
type UpdatedUserAvatarResponse struct {
|
|
AvatarUrl string
|
|
}
|