데이터 저장
This commit is contained in:
@@ -9,10 +9,10 @@ interface CreateDataflowDiagramData {
|
||||
relationships: Record<string, unknown>; // JSON 데이터
|
||||
node_positions?: Record<string, unknown> | null; // JSON 데이터 (노드 위치 정보)
|
||||
|
||||
// 조건부 연결 관련 필드
|
||||
control?: Record<string, unknown> | null; // JSON 데이터 (조건 설정)
|
||||
category?: string; // 연결 종류 ("simple-key", "data-save", "external-call")
|
||||
plan?: Record<string, unknown> | null; // JSON 데이터 (실행 계획)
|
||||
// 🔥 수정: 배열 구조로 변경된 조건부 연결 관련 필드
|
||||
control?: Array<Record<string, unknown>> | null; // JSON 배열 (각 관계별 조건 설정)
|
||||
category?: Array<Record<string, unknown>> | null; // JSON 배열 (각 관계별 연결 종류)
|
||||
plan?: Array<Record<string, unknown>> | null; // JSON 배열 (각 관계별 실행 계획)
|
||||
|
||||
company_code: string;
|
||||
created_by: string;
|
||||
@@ -24,10 +24,10 @@ interface UpdateDataflowDiagramData {
|
||||
relationships?: Record<string, unknown>; // JSON 데이터
|
||||
node_positions?: Record<string, unknown> | null; // JSON 데이터 (노드 위치 정보)
|
||||
|
||||
// 조건부 연결 관련 필드
|
||||
control?: Record<string, unknown> | null; // JSON 데이터 (조건 설정)
|
||||
category?: string; // 연결 종류 ("simple-key", "data-save", "external-call")
|
||||
plan?: Record<string, unknown> | null; // JSON 데이터 (실행 계획)
|
||||
// 🔥 수정: 배열 구조로 변경된 조건부 연결 관련 필드
|
||||
control?: Array<Record<string, unknown>> | null; // JSON 배열 (각 관계별 조건 설정)
|
||||
category?: Array<Record<string, unknown>> | null; // JSON 배열 (각 관계별 연결 종류)
|
||||
plan?: Array<Record<string, unknown>> | null; // JSON 배열 (각 관계별 실행 계획)
|
||||
|
||||
updated_by: string;
|
||||
}
|
||||
@@ -142,7 +142,11 @@ export const createDataflowDiagram = async (
|
||||
node_positions: data.node_positions as
|
||||
| Prisma.InputJsonValue
|
||||
| undefined,
|
||||
category: data.category || undefined,
|
||||
category: data.category
|
||||
? (data.category as Prisma.InputJsonValue)
|
||||
: undefined,
|
||||
control: data.control as Prisma.InputJsonValue | undefined,
|
||||
plan: data.plan as Prisma.InputJsonValue | undefined,
|
||||
company_code: data.company_code,
|
||||
created_by: data.created_by,
|
||||
updated_by: data.updated_by,
|
||||
@@ -213,7 +217,17 @@ export const updateDataflowDiagram = async (
|
||||
? (data.node_positions as Prisma.InputJsonValue)
|
||||
: Prisma.JsonNull,
|
||||
}),
|
||||
...(data.category !== undefined && { category: data.category }),
|
||||
...(data.category !== undefined && {
|
||||
category: data.category
|
||||
? (data.category as Prisma.InputJsonValue)
|
||||
: undefined,
|
||||
}),
|
||||
...(data.control !== undefined && {
|
||||
control: data.control as Prisma.InputJsonValue | undefined,
|
||||
}),
|
||||
...(data.plan !== undefined && {
|
||||
plan: data.plan as Prisma.InputJsonValue | undefined,
|
||||
}),
|
||||
updated_by: data.updated_by,
|
||||
updated_at: new Date(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user