package session

// Main information about a session
type RecordSession struct {
	// Public session ID
	PublicSessionID string `json:"public_session_id"`

	// Username
	User string `json:"user"`

	// Subject from JWT
	Sub string `json:"sub"`

	// Session ID from JWT
	SID string `json:"sid"`

	// Authorization system
	AuthorizeSystem string `json:"authorize_system"`

	// Client IP address
	IP string `json:"ip"`

	// Client User-Agent
	UserAgent string `json:"user_agent"`

	// First login time
	LoginTime string `json:"login_time"`

	// Last activity time
	UpdatedAt string `json:"updated_at"`

	//  Logout time
	LogoutTime string `json:"logout_time"`

	// Session expiration time
	Expires string `json:"expires"`

	// OAuth provider type
	OAuthType string `json:"oauth_type"`
}

// List of sessions
type ListSession struct {
	// Data
	Data []ItemSession `json:"data"`

	// Entry count
	EntryCount uint64 `json:"entryCount"`
}

// A session item
type ItemSession struct {
	// Public session ID
	PublicSessionID string `json:"public_session_id"`

	// Username
	User string `json:"user"`

	// Subject from JWT
	Sub string `json:"sub"`

	// Session ID from JWT
	SID string `json:"sid"`

	// Authorization system
	AuthorizeSystem string `json:"authorize_system"`

	// Client IP address
	IP string `json:"ip"`

	// Client User-Agent
	UserAgent string `json:"user_agent"`

	// First login time
	LoginTime string `json:"login_time"`

	// Last activity time
	UpdatedAt string `json:"updated_at"`

	//  Logout time
	LogoutTime string `json:"logout_time"`

	// Session expiration time
	Expires string `json:"expires"`
}
