/** * @description 前缀搜索项目下的物理表 * @throws Exception code * PROJECT_MEMBER_NOT_FOUND:项目成员不存在 * GET_TABLE_NAME_LIST_IN_PROJECT_FAILED:获取表信息失败 * @p1-test * 无 * @p2-test * 无 * @p3-test * PROJECT_MEMBER_NOT_FOUND:使用非本项目成员帐号获取该项目下的表 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** bizUnitId */ bizUnitId: number; /** 项目Id */ projectId?: number; /** 是否只查自己owner的 */ ownedOnly?: boolean; /** 表名前缀 */ tableName: string; } export const init = new defs.TableNameWithProjectIdBO(); export async function request(params = {}) { return Request({ url: '/api/physicaltable/{bizUnitId}/tableList', params, method: 'get', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'GET', url: getUrl('/api/physicaltable/{bizUnitId}/tableList', params, 'GET'), params, init, }; }; }