From 8dbe5dffe47b724550b44a2d5744ae84f4139a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Thu, 19 Feb 2026 20:48:26 +0900 Subject: [PATCH] =?UTF-8?q?feat:=EB=B0=94=EB=A1=9C=EB=B9=8C=20=EA=B3=84?= =?UTF-8?q?=EC=A2=8C=20=EA=B1=B0=EB=9E=98=20=EB=8F=99=EA=B8=B0=ED=99=94=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=ED=85=8C=EC=9D=B4=EB=B8=94=20=EB=A7=88?= =?UTF-8?q?=EC=9D=B4=EA=B7=B8=EB=A0=88=EC=9D=B4=EC=85=98=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- LOGICAL_RELATIONSHIPS.md | 14 +++++++- ...create_barobill_bank_sync_status_table.php | 36 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2026_02_19_create_barobill_bank_sync_status_table.php diff --git a/LOGICAL_RELATIONSHIPS.md b/LOGICAL_RELATIONSHIPS.md index 27e2908..115db54 100644 --- a/LOGICAL_RELATIONSHIPS.md +++ b/LOGICAL_RELATIONSHIPS.md @@ -1,6 +1,6 @@ # 논리적 데이터베이스 관계 문서 -> **자동 생성**: 2026-02-12 20:26:02 +> **자동 생성**: 2026-02-19 16:26:58 > **소스**: Eloquent 모델 관계 분석 ## 📊 모델별 관계 현황 @@ -635,8 +635,10 @@ ### work_orders - **items()**: hasMany → `work_order_items` - **issues()**: hasMany → `work_order_issues` - **stepProgress()**: hasMany → `work_order_step_progress` +- **materialInputs()**: hasMany → `work_order_material_inputs` - **shipments()**: hasMany → `shipments` - **bendingDetail()**: hasOne → `work_order_bending_details` +- **documents()**: morphMany → `documents` ### work_order_assignees **모델**: `App\Models\Production\WorkOrderAssignee` @@ -662,6 +664,16 @@ ### work_order_items - **workOrder()**: belongsTo → `work_orders` - **item()**: belongsTo → `items` - **sourceOrderItem()**: belongsTo → `order_items` +- **materialInputs()**: hasMany → `work_order_material_inputs` + +### work_order_material_inputs +**모델**: `App\Models\Production\WorkOrderMaterialInput` + +- **workOrder()**: belongsTo → `work_orders` +- **workOrderItem()**: belongsTo → `work_order_items` +- **stockLot()**: belongsTo → `stock_lots` +- **item()**: belongsTo → `items` +- **inputBy()**: belongsTo → `users` ### work_order_step_progress **모델**: `App\Models\Production\WorkOrderStepProgress` diff --git a/database/migrations/2026_02_19_create_barobill_bank_sync_status_table.php b/database/migrations/2026_02_19_create_barobill_bank_sync_status_table.php new file mode 100644 index 0000000..6c42d59 --- /dev/null +++ b/database/migrations/2026_02_19_create_barobill_bank_sync_status_table.php @@ -0,0 +1,36 @@ +id(); + $table->foreignId('tenant_id')->constrained()->onDelete('cascade'); + $table->string('bank_account_num', 50)->comment('계좌번호'); + $table->string('synced_year_month', 6)->comment('동기화 완료된 월 (YYYYMM)'); + $table->timestamp('synced_at')->comment('마지막 동기화 시각'); + $table->timestamps(); + + $table->unique( + ['tenant_id', 'bank_account_num', 'synced_year_month'], + 'bb_sync_status_unique' + ); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('barobill_bank_sync_status'); + } +};