import { requestClient } from '#/api/request';

export namespace IndexApi {
  /** 统计数据 */
  export interface Statistics {
    school_count?: number;
    classroom_count?: number;
    class_count?: number;
    student_count?: number;
    teacher_count?: number;
    booking_count?: number;
    selected_seat_count?: number;
  }

  /** 系统信息 */
  export interface SystemInfo {
    os?: string;
    php?: string;
    server?: string;
    mysql?: string;
    upload_max?: string;
    max_execution_time?: string;
    disk_free_space?: string;
    disk_total_space?: string;
    disk_usage?: string;
    runtime_path?: string;
    framework_version?: string;
    statistics?: Statistics;
    [key: string]: any;
  }
}

/**
 * 获取系统信息
 * GET /api/admin/index/systemInfo
 */
export async function getSystemInfoApi() {
  // 使用 responseReturn: 'body' 获取完整响应体
  return requestClient.get<any>('/api/admin/index/systemInfo', {
    responseReturn: 'body',
  });
}

