import { defHttp } from '@/utils/http/axios';
import { AccountListGetResultModel, AccountListItem, AccountParams } from './model/index';

enum Api {
  ADDFORMDATA = '/api/FormScheme/SaveForm', //获取数据库
  GETDESIGNDATA = '/api/FormModule/GetEntityByCode', //获取设计数据
  GETFORMPAGEDATA = '/api/FormScheme/GetFormDataPage?id=fb572b6a-5cfd-4763-bdf5-4aa10fa8edb4', //获取表单分页数据
}
/**
 * @description: Get sample options value
 */
export const getFormsDesignData = (params: AccountParams) =>
  defHttp.get<AccountListGetResultModel[]>({ url: Api.GETDESIGNDATA, params });
export const getFormsPageData = (params: AccountParams) =>
  defHttp.post<AccountListGetResultModel[]>({ url: Api.GETFORMPAGEDATA, params });
export const addFormData = (params: AccountListItem) =>
  defHttp.post<AccountListGetResultModel>({ url: Api.ADDFORMDATA + params.id, params });
