import api from '../utils/request'

export interface User {
  id: number
  mobile: string
  role: string
  status: string
  name?: string
  english_name?: string
}

export const searchUsers = (keyword: string) => {
  return api.get<User[]>('/users/search', { params: { keyword } })
}

export interface UserListResponse {
  total: number
  items: User[]
}

export const getUsers = (params: any) => {
  return api.get<UserListResponse>('/users/', { params })
}

