저장버튼 제어기능 (insert)

This commit is contained in:
kjs
2025-09-18 10:05:50 +09:00
parent 7b7f81d85c
commit 7cbbf45dc9
32 changed files with 8500 additions and 116 deletions

View File

@@ -844,12 +844,92 @@ export interface ButtonTypeConfig {
// 커스텀 액션 설정
customAction?: string; // JavaScript 코드 또는 함수명
// 🔥 NEW: 제어관리 기능 추가
enableDataflowControl?: boolean; // 제어관리 활성화 여부
dataflowConfig?: ButtonDataflowConfig; // 제어관리 설정
dataflowTiming?: "before" | "after" | "replace"; // 실행 타이밍
// 스타일 설정
backgroundColor?: string;
textColor?: string;
borderColor?: string;
}
// 🔥 NEW: 버튼 데이터플로우 설정
export interface ButtonDataflowConfig {
// 제어 방식 선택
controlMode: "simple" | "advanced";
// Simple 모드: 기존 관계도 선택
selectedDiagramId?: number;
selectedRelationshipId?: string;
// Advanced 모드: 직접 조건 설정
directControl?: {
sourceTable: string;
triggerType: "insert" | "update" | "delete";
conditions: DataflowCondition[];
actions: DataflowAction[];
};
// 실행 옵션
executionOptions?: {
rollbackOnError?: boolean;
enableLogging?: boolean;
maxRetryCount?: number;
asyncExecution?: boolean;
};
}
// 데이터플로우 조건
export interface DataflowCondition {
id: string;
type: "condition" | "group-start" | "group-end";
field?: string;
operator?: "=" | "!=" | ">" | "<" | ">=" | "<=" | "LIKE";
value?: any;
dataType?: "string" | "number" | "boolean" | "date";
logicalOperator?: "AND" | "OR";
groupId?: string;
groupLevel?: number;
}
// 데이터플로우 액션
export interface DataflowAction {
id: string;
name: string;
actionType: "insert" | "update" | "delete" | "upsert";
targetTable: string;
conditions?: DataflowCondition[];
fieldMappings: DataflowFieldMapping[];
splitConfig?: {
sourceField: string;
delimiter: string;
targetField: string;
};
}
// 필드 매핑
export interface DataflowFieldMapping {
sourceTable?: string;
sourceField: string;
targetTable?: string;
targetField: string;
defaultValue?: string;
transformFunction?: string;
}
// 실행 결과
export interface DataflowExecutionResult {
success: boolean;
executedActions: number;
message?: string;
error?: string;
timing?: "before" | "after" | "replace";
originalActionResult?: any;
dataflowResult?: any;
}
// 화면 해상도 설정
export interface ScreenResolution {
width: number;