mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-25 06:57:15 +08:00
feat: 新增保存代码生成配置信息接口
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user