export type PermissionName = string;

export interface Permission {
  id: number;
  name: PermissionName;
  display_name: string;
  description: string;
  module: string;
  created_at: string;
  updated_at: string;
}

export interface Role {
  id: number;
  name: string;
  display_name: string;
  description: string;
  is_system: boolean;
  permissions: Permission[];
  created_at: string;
  updated_at: string;
}

export interface RolePayload {
  name: string;
  display_name: string;
  description: string;
  permission_ids: number[];
}

export interface CurrentUser {
  id: number;
  first_name: string;
  last_name: string;
  username: string;
  email: string;
  role: string;
  permissions: PermissionName[];
}
