admin-dashboard-backend/modules/structs/user.go

45 lines
781 B
Go

package structs
import (
"time"
)
type User struct {
Id string
RoleId string
Avatar string
Username string
Email string
Password string
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
}
type UserLoginRequest struct {
Username string
Password string
}
type UserLoginResponse struct {
Session string
}
type UserResponse struct {
Username string
Email string
}
type UserSignOutSessionRequest struct {
IdForDeletion string
}