// sysDataItemDetail 字典明细接口api
import { defHttp } from '@/utils/http/axios';
import {CodeParams,AddParams,UpdateParams ,DeleteParams,GetSysDataItemDetailModel} from './model/sysDataItemDetailModel'
enum Api {
  Load = '/api/SysDataItemDetail/Load',
  Add = '/api/SysDataItemDetail/Add',
  Update = '/api/SysDataItemDetail/Update',
  Delete = '/api/SysDataItemDetail/Delete',
}

/**
 * @description: postAdd
 */
export function postAdd(code:CodeParams, params:AddParams) {
  return defHttp.post(
    {
      url: Api.Add + "?code=" + code,
      params,
    },
  );
}

/**
 * @description: getLoad
 */
export function getLoad(params: CodeParams) {
  return defHttp.get<GetSysDataItemDetailModel>({ url: Api.Load, params });
}

export function update(params?:UpdateParams) {
  console.log(params)
  return defHttp.post({
    url: Api.Update,
    params
  });
}

export function del(params:DeleteParams) {
  return defHttp.post({ url: Api.Delete + "?id=" + params.id });
}


