<%
var ulc = isBlank(prefix) ? table.name : subAfter(table.name, prefix);
var lcc = toCamelCase(ulc);
var ucc = upperFirst(lcc);
var dc = toDashCase(lcc);

var pageVueName = ucc + ".vue";
var formVueName = ucc + "Form.vue";
var pageTsName = "page.ts";
var apiTsName = dc + "-api.ts";
var dTsName = dc + ".d.ts";
%>
import {
  get,
  post
} from '@/common/utils/http-util.ts'

export default {
  paging(data: ${ucc}Types.Search${ucc}Param) {
    return get<G.PageResult<${ucc}Types.Search${ucc}Result>>('/${ulc}/paging', data)
  },
  detail(id: string) {
    return get<${ucc}Types.Search${ucc}Result>('/${ulc}/detail', {id})
  },
  add(data: ${ucc}Types.Add${ucc}Param) {
    return post('/${ulc}/add', data)
  },
  modify(data: ${ucc}Types.Modify${ucc}Param) {
    return post('/${ulc}/modify', data)
  },
  del(ids: string[]) {
    return post('/${ulc}/del', ids)
  },
}
