import request from '@/utils/request'
import { PageType, StrAnyObj } from '@/typings'

// ${table.comment!}分页
export function getPageApi(params: StrAnyObj): Promise<PageType<StrAnyObj>> {
  return request.get('/${table.entityPath}/getPage', params)
}

// ${table.comment!}明细
export function getDetailApi(params: StrAnyObj): Promise<StrAnyObj> {
  return request.get('/${table.entityPath}/getDetail', params)
}

// ${table.comment!}新增
export function addApi(data: StrAnyObj): Promise<void> {
  return request.post('/${table.entityPath}/add', data)
}

// ${table.comment!}编辑
export function editApi(data: StrAnyObj): Promise<void> {
  return request.post('/${table.entityPath}/edit', data)
}

// ${table.comment!}删除
export function deleteApi(data: StrAnyObj): Promise<void> {
  return request.post('/${table.entityPath}/delete', data)
}