From ced89740a324254a73dba445e0d11ede24e34165 Mon Sep 17 00:00:00 2001 From: kent Date: Tue, 13 Jan 2026 19:49:49 +0900 Subject: [PATCH] =?UTF-8?q?docs(API):=20=EB=85=BC=EB=A6=AC=20=EA=B4=80?= =?UTF-8?q?=EA=B3=84=20=EB=AC=B8=EC=84=9C=20=EB=B0=8F=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- LOGICAL_RELATIONSHIPS.md | 70 ++++++++++++++++++- .../Feature/ItemMaster/ItemMasterApiTest.php | 1 - 2 files changed, 69 insertions(+), 2 deletions(-) diff --git a/LOGICAL_RELATIONSHIPS.md b/LOGICAL_RELATIONSHIPS.md index a71cb9e..a0641ba 100644 --- a/LOGICAL_RELATIONSHIPS.md +++ b/LOGICAL_RELATIONSHIPS.md @@ -1,6 +1,6 @@ # 논리적 데이터베이스 관계 문서 -> **자동 생성**: 2026-01-05 14:14:22 +> **자동 생성**: 2026-01-13 09:55:38 > **소스**: Eloquent 모델 관계 분석 ## 📊 모델별 관계 현황 @@ -122,6 +122,45 @@ ### company_requests - **approver()**: belongsTo → `users` - **createdTenant()**: belongsTo → `tenants` +### contracts +**모델**: `App\Models\Construction\Contract` + +- **contractManager()**: belongsTo → `users` +- **constructionPm()**: belongsTo → `users` +- **creator()**: belongsTo → `users` +- **updater()**: belongsTo → `users` + +### handover_reports +**모델**: `App\Models\Construction\HandoverReport` + +- **contract()**: belongsTo → `contracts` +- **contractManager()**: belongsTo → `users` +- **constructionPm()**: belongsTo → `users` +- **creator()**: belongsTo → `users` +- **updater()**: belongsTo → `users` +- **managers()**: hasMany → `handover_report_managers` +- **items()**: hasMany → `handover_report_items` + +### handover_report_items +**모델**: `App\Models\Construction\HandoverReportItem` + +- **handoverReport()**: belongsTo → `handover_reports` +- **creator()**: belongsTo → `users` +- **updater()**: belongsTo → `users` + +### handover_report_managers +**모델**: `App\Models\Construction\HandoverReportManager` + +- **handoverReport()**: belongsTo → `handover_reports` +- **creator()**: belongsTo → `users` +- **updater()**: belongsTo → `users` + +### structure_reviews +**모델**: `App\Models\Construction\StructureReview` + +- **creator()**: belongsTo → `users` +- **updater()**: belongsTo → `users` + ### bom_templates **모델**: `App\Models\Design\BomTemplate` @@ -298,6 +337,7 @@ ### orders **모델**: `App\Models\Orders\Order` - **quote()**: belongsTo → `quotes` +- **client()**: belongsTo → `clients` - **item()**: belongsTo → `items` - **items()**: hasMany → `order_items` - **histories()**: hasMany → `order_histories` @@ -363,24 +403,40 @@ ### process **모델**: `App\Models\Process` - **classificationRules()**: hasMany → `process_classification_rules` +- **processItems()**: hasMany → `process_items` ### process_classification_rules **모델**: `App\Models\ProcessClassificationRule` - **process()**: belongsTo → `processes` +### process_items +**모델**: `App\Models\ProcessItem` + +- **process()**: belongsTo → `processes` +- **item()**: belongsTo → `items` + ### work_orders **모델**: `App\Models\Production\WorkOrder` - **salesOrder()**: belongsTo → `orders` +- **process()**: belongsTo → `processes` - **assignee()**: belongsTo → `users` - **team()**: belongsTo → `departments` - **creator()**: belongsTo → `users` - **updater()**: belongsTo → `users` +- **assignees()**: hasMany → `work_order_assignees` +- **primaryAssignee()**: hasMany → `work_order_assignees` - **items()**: hasMany → `work_order_items` - **issues()**: hasMany → `work_order_issues` - **bendingDetail()**: hasOne → `work_order_bending_details` +### work_order_assignees +**모델**: `App\Models\Production\WorkOrderAssignee` + +- **workOrder()**: belongsTo → `work_orders` +- **user()**: belongsTo → `users` + ### work_order_bending_details **모델**: `App\Models\Production\WorkOrderBendingDetail` @@ -448,6 +504,8 @@ ### quotes - **client()**: belongsTo → `clients` - **item()**: belongsTo → `items` +- **order()**: belongsTo → `orders` +- **siteBriefing()**: belongsTo → `site_briefings` - **finalizer()**: belongsTo → `users` - **creator()**: belongsTo → `users` - **updater()**: belongsTo → `users` @@ -710,6 +768,16 @@ ### sites - **creator()**: belongsTo → `users` - **updater()**: belongsTo → `users` +- **client()**: belongsTo → `clients` + +### site_briefings +**모델**: `App\Models\Tenants\SiteBriefing` + +- **partner()**: belongsTo → `clients` +- **site()**: belongsTo → `sites` +- **creator()**: belongsTo → `users` +- **updater()**: belongsTo → `users` +- **quotes()**: hasMany → `quotes` ### stocks **모델**: `App\Models\Tenants\Stock` diff --git a/tests/Feature/ItemMaster/ItemMasterApiTest.php b/tests/Feature/ItemMaster/ItemMasterApiTest.php index 149c0ab..f12a593 100644 --- a/tests/Feature/ItemMaster/ItemMasterApiTest.php +++ b/tests/Feature/ItemMaster/ItemMasterApiTest.php @@ -924,5 +924,4 @@ public function test_can_delete_item_bom_item(): void 'id' => $bomItem->id, ]); } - }