package structs import ( "time" ) type User struct { Id string RoleId string Avatar string Username string Email string Password string Deactivated bool LastOnline time.Time UpdatedAt time.Time CreatedAt time.Time } type UserSession struct { Id string // user session which he use to connect to the websocket and api server IdForDeletion string // this id is needed to sign out a session from website UserId string UserAgent string LastUsed time.Time ExpiresAt time.Time } // swagger:model UserLoginRequest type UserLoginRequest struct { Username string Password string } // swagger:model UserLoginResponse type UserLoginResponse struct { Session string } type UserResponse struct { Username string Email string } type UserSignOutSessionRequest struct { IdForDeletion string } type UserApiKey struct { Id string Token string UserId string Name string UsageCount uint CreatedAt time.Time LastUsed time.Time } // swagger:model UserInfoResponse type UserInfoResponse struct { UserId string Username string Avatar string Permissions []string AvailableCategoryGroups []string Users []AllUsers TotalNotifications int } // swagger:model UserProfileResponse type UserProfileResponse struct { Email string Sessions []UserSessionSocket ApiKeys []UserApiKey }