/** * @description 事实逻辑表新增-度量或者事实属性 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** 项目id */ projectId: number; /** modelId */ modelId: number; /** 事实表名字 */ name: string; /** lock */ lock: number; } export const init = undefined; export async function request(params = {}, bodyParams = {}) { return Request({ url: '/api/model/factTable/{modelId}/field/', params: bodyParams, method: 'post', }); } export function createFetchAction(types, stateKey) { return (params = {}, bodyParams, meta?: any) => { return { types, meta, stateKey, method: 'POST', url: getUrl('/api/model/factTable/{modelId}/field/', params, 'POST'), params: bodyParams, init, }; }; }