export interface MonitoredService {
  id: string;
  name: string;
  url: string;
  type: 'internal' | 'custom';
  is_active: boolean;
  created_at: string;
  updated_at: string;
}

export interface PingResult {
  name: string;
  url: string;
  status: 'up' | 'down';
  latencyMs: number;
  error?: string;
  checked_at?: string;
}

export interface PingHistoryEntry {
  id: number;
  service_id: string;
  status: string;
  response_time_ms: number | null;
  checked_at: string;
}

export interface StatusSummary {
  up: number;
  total: number;
}

export interface SystemHealth {
  nodeVersion: string;
  uptime: number;
  memoryUsage: {
    heapUsed: number;
    heapTotal: number;
    rss: number;
    external: number;
  };
  dbStatus: boolean;
  dbSize: string;
}

export interface UserOverview {
  id: string;
  email: string;
  name: string;
  role: string;
  groups: string[];
  is_active: boolean;
  last_login_at: string | null;
}

export interface BroadcastPayload {
  titel: string;
  nachricht: string;
  schwere?: 'info' | 'warnung' | 'fehler';
  targetGroup?: string;
  targetDienstgrad?: string[];
}

export interface BroadcastPreviewPayload {
  targetGroup?: string;
  targetDienstgrad?: string[];
}
