import {
  get,
  post
} from '@/common/utils/http-util.ts'

export default {
  paging(data: UserTypes.SearchForm & G.PageParam) {
    return get<G.PageResult<UserTypes.SysUser>>('/sys_user/paging', data)
  },
  list(pid: string | null = null) {
    return get<UserTypes.SysUser[]>('/sys_user/list', {pid: pid})
  },
  detail(id: string) {
    return get<UserTypes.SysUser>('/sys_user/detail', {id})
  },
  add(data: UserTypes.SysUser) {
    return post('/sys_user/add', data)
  },
  modify(data: UserTypes.SysUser) {
    return post('/sys_user/modify', data)
  },
  del(ids: string[]) {
    return post('/sys_user/del', ids)
  },
}
