mirror of
https://github.com/rmoren97/mc-manager.git
synced 2026-02-10 17:40:30 -08:00
43 lines
726 B
TypeScript
43 lines
726 B
TypeScript
export interface Permission {
|
|
resource: string
|
|
actions: string[]
|
|
}
|
|
|
|
export interface Role {
|
|
_id: string
|
|
name: string
|
|
permissions: Permission[]
|
|
description: string
|
|
isDefault: boolean
|
|
createdAt: string
|
|
updatedAt: string
|
|
}
|
|
|
|
export interface User {
|
|
_id: string
|
|
username: string
|
|
email: string
|
|
roles: Role[] | string[]
|
|
status: 'active' | 'inactive' | 'locked'
|
|
lastLogin: string | null
|
|
loginAttempts: number
|
|
lockUntil: string | null
|
|
createdAt: string
|
|
updatedAt: string
|
|
}
|
|
|
|
export interface AuthUser {
|
|
_id: string
|
|
id: string
|
|
username: string
|
|
email: string
|
|
permissions: string[]
|
|
roles: string[]
|
|
}
|
|
|
|
export interface SessionPayload {
|
|
userId: string
|
|
username: string
|
|
email: string
|
|
}
|