feat: 新增保存代码生成配置信息接口

This commit is contained in:
2023-08-08 23:59:57 +08:00
parent abae964970
commit 0fae13e779
11 changed files with 194 additions and 93 deletions

View File

@@ -30,14 +30,12 @@ export function listTable(params: TableParam) {
}
export interface ColumnMappingRecord {
id: string;
tableName: string;
columnName: string;
columnType: string;
fieldName: string;
fieldType: string;
comment: string;
sort: number;
isRequired: boolean;
showInList: boolean;
showInForm: boolean;
@@ -53,7 +51,6 @@ export function listColumnMapping(tableName: string) {
}
export interface GenConfigRecord {
id: string;
tableName: string;
moduleName: string;
packageName: string;
@@ -69,3 +66,12 @@ export interface GenConfigRecord {
export function getGenConfig(tableName: string) {
return axios.get<GenConfigRecord>(`${BASE_URL}/table/${tableName}`);
}
export interface GeneratorConfigRecord {
genConfig: GenConfigRecord;
columnMappings: ColumnMappingRecord[];
}
export function saveConfig(tableName: string, req: GeneratorConfigRecord) {
return axios.post(`${BASE_URL}/table/${tableName}`, req);
}