Merge pull request '행 이동 화면 할당한 상황에서도 가능하게, 코드병합 버튼액션에 추가' (#183) from lhj into main

Reviewed-on: http://39.117.244.52:3000/kjs/ERP-node/pulls/183
This commit is contained in:
2025-11-04 18:34:43 +09:00
19 changed files with 5655 additions and 245 deletions

View File

@@ -0,0 +1,45 @@
import { apiClient } from "./client";
export interface TableColumn {
name: string;
type: string;
nullable: boolean;
default: string | null;
maxLength: number | null;
precision: number | null;
scale: number | null;
}
export interface TableSchemaResponse {
success: boolean;
message: string;
data: {
tableName: string;
columns: TableColumn[];
};
}
/**
* 테이블 스키마 조회 (엑셀 업로드 컬럼 매핑용)
*/
export async function getTableSchema(
tableName: string
): Promise<TableSchemaResponse> {
try {
const response = await apiClient.get<TableSchemaResponse>(
`/admin/tables/${tableName}/schema`
);
return response.data;
} catch (error: any) {
console.error("테이블 스키마 조회 실패:", error);
return {
success: false,
message: error.response?.data?.message || "테이블 스키마 조회 실패",
data: {
tableName,
columns: [],
},
};
}
}