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

export default {
  paging(data: TenantTypes.Tenant & G.PageParam) {
    return get<G.PageResult<TenantTypes.Tenant>>('/sys_tenant/paging', data)
  },
  list() {
    return get<TenantTypes.Tenant[]>('/sys_tenant/list')
  },
  detail(id: string) {
    return get<TenantTypes.Tenant>('/sys_tenant/detail', {id})
  },
  add(data: TenantTypes.Tenant) {
    return post('/sys_tenant/add', data)
  },
  modify(data: TenantTypes.Tenant) {
    return post('/sys_tenant/modify', data)
  },
  del(ids: string[]) {
    return post('/sys_tenant/del', ids)
  },
}
