데이터 저장

This commit is contained in:
hyeonsu
2025-09-15 20:07:28 +09:00
parent 6a04ae450d
commit 2c677c2fb8
7 changed files with 636 additions and 253 deletions

View File

@@ -210,6 +210,7 @@ export interface JsonRelationship {
toTable: string;
fromColumns: string[];
toColumns: string[];
connectionType: "simple-key" | "data-save" | "external-call";
settings?: Record<string, unknown>;
}
@@ -220,7 +221,48 @@ export interface CreateDiagramRequest {
tables: string[];
};
node_positions?: NodePositions;
category?: string; // 연결 종류 ("simple-key", "data-save", "external-call")
// 🔥 수정: 각 관계별 정보를 배열로 저장
category?: Array<{
id: string;
category: "simple-key" | "data-save" | "external-call";
}>;
// 🔥 전체 실행 조건 - relationships의 id와 동일한 id 사용
control?: Array<{
id: string; // relationships의 id와 동일
triggerType: "insert" | "update" | "delete";
conditions?: Array<{
field: string;
operator: "=" | "!=" | ">" | "<" | ">=" | "<=" | "LIKE";
value: unknown;
logicalOperator?: "AND" | "OR";
}>;
}>;
// 🔥 저장 액션 - relationships의 id와 동일한 id 사용
plan?: Array<{
id: string; // relationships의 id와 동일
sourceTable: string;
actions: Array<{
id: string;
name: string;
actionType: "insert" | "update" | "delete" | "upsert";
fieldMappings: Array<{
sourceTable?: string;
sourceField: string;
targetTable?: string;
targetField: string;
defaultValue?: string;
transformFunction?: string;
}>;
conditions?: Array<{
id: string;
type: string;
field: string;
operator_type: string;
value: unknown;
logicalOperator?: string;
}>;
}>;
}>;
}
export interface JsonDataFlowDiagramsResponse {