/**
 * 运营商模块 API
 */
import { get } from '@/utils/request'

/**
 * 运营商信息
 */
export interface CarrierInfo {
  id: number
  carrier_code: string
  carrier_name: string
  carrier_type: string // CTCC, CMCC, CUCC
  description?: string
  data_reset_day?: number
  realname_link_type?: string
  realname_link_template?: string
  status?: number
  created_at?: string
  updated_at?: string
}

/**
 * 运营商列表参数
 */
export interface CarrierListParams {
  page?: number
  size?: number
}

/**
 * 列表响应
 */
export interface CarrierListResponse {
  items: CarrierInfo[]
  total: number
  page: number
  size: number
}

/**
 * 获取运营商列表
 * GET /api/admin/carriers
 */
export function getCarriers(params?: CarrierListParams) {
  return get<CarrierListResponse>('/api/admin/carriers', { params })
}
