2020-10-28 15:35:41 +02:00
|
|
|
package model
|
|
|
|
|
2021-02-17 21:29:20 +02:00
|
|
|
// User is a user
|
|
|
|
// swagger:model
|
2020-10-28 15:35:41 +02:00
|
|
|
type User struct {
|
2021-02-17 21:29:20 +02:00
|
|
|
// The user ID
|
|
|
|
// required: true
|
|
|
|
ID string `json:"id"`
|
|
|
|
|
|
|
|
// The user name
|
|
|
|
// required: true
|
|
|
|
Username string `json:"username"`
|
|
|
|
|
|
|
|
// The user's email
|
|
|
|
// required: true
|
|
|
|
Email string `json:"email"`
|
|
|
|
|
|
|
|
// swagger:ignore
|
|
|
|
Password string `json:"-"`
|
|
|
|
|
|
|
|
// swagger:ignore
|
|
|
|
MfaSecret string `json:"-"`
|
|
|
|
|
|
|
|
// swagger:ignore
|
|
|
|
AuthService string `json:"-"`
|
|
|
|
|
|
|
|
// swagger:ignore
|
|
|
|
AuthData string `json:"-"`
|
|
|
|
|
|
|
|
// User settings
|
|
|
|
// required: true
|
|
|
|
Props map[string]interface{} `json:"props"`
|
|
|
|
|
|
|
|
// Created time
|
|
|
|
// required: true
|
|
|
|
CreateAt int64 `json:"create_at,omitempty"`
|
|
|
|
|
|
|
|
// Updated time
|
|
|
|
// required: true
|
|
|
|
UpdateAt int64 `json:"update_at,omitempty"`
|
|
|
|
|
|
|
|
// Deleted time, set to indicate user is deleted
|
|
|
|
// required: true
|
|
|
|
DeleteAt int64 `json:"delete_at"`
|
2020-10-28 15:35:41 +02:00
|
|
|
}
|
2020-12-02 22:12:14 +02:00
|
|
|
|
|
|
|
type Session struct {
|
2020-12-04 12:28:35 +02:00
|
|
|
ID string `json:"id"`
|
|
|
|
Token string `json:"token"`
|
|
|
|
UserID string `json:"user_id"`
|
|
|
|
Props map[string]interface{} `json:"props"`
|
|
|
|
CreateAt int64 `json:"create_at,omitempty"`
|
|
|
|
UpdateAt int64 `json:"update_at,omitempty"`
|
2020-12-02 22:12:14 +02:00
|
|
|
}
|