// =============================================================================
// RBAC TYPES
// =============================================================================

export interface Tenant {
  id: string
  name: string
  slug: string
  status: string
  user_limit: number
  llm_quota: number
  settings: Record<string, unknown>
  created_at: string
  updated_at: string
}

export interface Namespace {
  id: string
  tenant_id: string
  name: string
  slug: string
  isolation_level: string
  classification: string
  created_at: string
}

export interface Role {
  id: string
  name: string
  description: string
  is_system: boolean
  permissions: string[]
  created_at: string
}

export interface UserRole {
  id: string
  user_id: string
  role_id: string
  role_name: string
  namespace_id: string | null
  expires_at: string | null
  created_at: string
}

export interface LLMPolicy {
  id: string
  name: string
  description: string
  tenant_id: string
  namespace_id: string | null
  allowed_models: string[]
  blocked_models: string[]
  rate_limit_rpm: number
  rate_limit_tpd: number
  pii_detection_required: boolean
  pii_redaction_required: boolean
  max_tokens_per_request: number
  is_active: boolean
  created_at: string
  updated_at: string
}

export type TabId = 'tenants' | 'namespaces' | 'roles' | 'users' | 'policies'
