Files
simrsx-fe/app/models/role.ts
Munawwirul Jamal 3eb9dde21d Dev cleaning (#106)
2025-10-08 00:03:36 +07:00

23 lines
457 B
TypeScript

import type { PAGE_PERMISSIONS } from '~/lib/page-permission'
export interface User {
id: string
name: string
email: string
}
export interface AuthState {
user: User | null
roles: string[]
token: string | null
}
export type Permission = 'C' | 'R' | 'U' | 'D'
export interface RoleAccess {
[role: string]: Permission[]
}
export type PagePath = keyof typeof PAGE_PERMISSIONS
export type PagePermission = (typeof PAGE_PERMISSIONS)[PagePath]