docs(API): 논리 관계 문서 및 테스트 수정
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# 논리적 데이터베이스 관계 문서
|
# 논리적 데이터베이스 관계 문서
|
||||||
|
|
||||||
> **자동 생성**: 2026-01-05 14:14:22
|
> **자동 생성**: 2026-01-13 09:55:38
|
||||||
> **소스**: Eloquent 모델 관계 분석
|
> **소스**: Eloquent 모델 관계 분석
|
||||||
|
|
||||||
## 📊 모델별 관계 현황
|
## 📊 모델별 관계 현황
|
||||||
@@ -122,6 +122,45 @@ ### company_requests
|
|||||||
- **approver()**: belongsTo → `users`
|
- **approver()**: belongsTo → `users`
|
||||||
- **createdTenant()**: belongsTo → `tenants`
|
- **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
|
### bom_templates
|
||||||
**모델**: `App\Models\Design\BomTemplate`
|
**모델**: `App\Models\Design\BomTemplate`
|
||||||
|
|
||||||
@@ -298,6 +337,7 @@ ### orders
|
|||||||
**모델**: `App\Models\Orders\Order`
|
**모델**: `App\Models\Orders\Order`
|
||||||
|
|
||||||
- **quote()**: belongsTo → `quotes`
|
- **quote()**: belongsTo → `quotes`
|
||||||
|
- **client()**: belongsTo → `clients`
|
||||||
- **item()**: belongsTo → `items`
|
- **item()**: belongsTo → `items`
|
||||||
- **items()**: hasMany → `order_items`
|
- **items()**: hasMany → `order_items`
|
||||||
- **histories()**: hasMany → `order_histories`
|
- **histories()**: hasMany → `order_histories`
|
||||||
@@ -363,24 +403,40 @@ ### process
|
|||||||
**모델**: `App\Models\Process`
|
**모델**: `App\Models\Process`
|
||||||
|
|
||||||
- **classificationRules()**: hasMany → `process_classification_rules`
|
- **classificationRules()**: hasMany → `process_classification_rules`
|
||||||
|
- **processItems()**: hasMany → `process_items`
|
||||||
|
|
||||||
### process_classification_rules
|
### process_classification_rules
|
||||||
**모델**: `App\Models\ProcessClassificationRule`
|
**모델**: `App\Models\ProcessClassificationRule`
|
||||||
|
|
||||||
- **process()**: belongsTo → `processes`
|
- **process()**: belongsTo → `processes`
|
||||||
|
|
||||||
|
### process_items
|
||||||
|
**모델**: `App\Models\ProcessItem`
|
||||||
|
|
||||||
|
- **process()**: belongsTo → `processes`
|
||||||
|
- **item()**: belongsTo → `items`
|
||||||
|
|
||||||
### work_orders
|
### work_orders
|
||||||
**모델**: `App\Models\Production\WorkOrder`
|
**모델**: `App\Models\Production\WorkOrder`
|
||||||
|
|
||||||
- **salesOrder()**: belongsTo → `orders`
|
- **salesOrder()**: belongsTo → `orders`
|
||||||
|
- **process()**: belongsTo → `processes`
|
||||||
- **assignee()**: belongsTo → `users`
|
- **assignee()**: belongsTo → `users`
|
||||||
- **team()**: belongsTo → `departments`
|
- **team()**: belongsTo → `departments`
|
||||||
- **creator()**: belongsTo → `users`
|
- **creator()**: belongsTo → `users`
|
||||||
- **updater()**: belongsTo → `users`
|
- **updater()**: belongsTo → `users`
|
||||||
|
- **assignees()**: hasMany → `work_order_assignees`
|
||||||
|
- **primaryAssignee()**: hasMany → `work_order_assignees`
|
||||||
- **items()**: hasMany → `work_order_items`
|
- **items()**: hasMany → `work_order_items`
|
||||||
- **issues()**: hasMany → `work_order_issues`
|
- **issues()**: hasMany → `work_order_issues`
|
||||||
- **bendingDetail()**: hasOne → `work_order_bending_details`
|
- **bendingDetail()**: hasOne → `work_order_bending_details`
|
||||||
|
|
||||||
|
### work_order_assignees
|
||||||
|
**모델**: `App\Models\Production\WorkOrderAssignee`
|
||||||
|
|
||||||
|
- **workOrder()**: belongsTo → `work_orders`
|
||||||
|
- **user()**: belongsTo → `users`
|
||||||
|
|
||||||
### work_order_bending_details
|
### work_order_bending_details
|
||||||
**모델**: `App\Models\Production\WorkOrderBendingDetail`
|
**모델**: `App\Models\Production\WorkOrderBendingDetail`
|
||||||
|
|
||||||
@@ -448,6 +504,8 @@ ### quotes
|
|||||||
|
|
||||||
- **client()**: belongsTo → `clients`
|
- **client()**: belongsTo → `clients`
|
||||||
- **item()**: belongsTo → `items`
|
- **item()**: belongsTo → `items`
|
||||||
|
- **order()**: belongsTo → `orders`
|
||||||
|
- **siteBriefing()**: belongsTo → `site_briefings`
|
||||||
- **finalizer()**: belongsTo → `users`
|
- **finalizer()**: belongsTo → `users`
|
||||||
- **creator()**: belongsTo → `users`
|
- **creator()**: belongsTo → `users`
|
||||||
- **updater()**: belongsTo → `users`
|
- **updater()**: belongsTo → `users`
|
||||||
@@ -710,6 +768,16 @@ ### sites
|
|||||||
|
|
||||||
- **creator()**: belongsTo → `users`
|
- **creator()**: belongsTo → `users`
|
||||||
- **updater()**: 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
|
### stocks
|
||||||
**모델**: `App\Models\Tenants\Stock`
|
**모델**: `App\Models\Tenants\Stock`
|
||||||
|
|||||||
@@ -924,5 +924,4 @@ public function test_can_delete_item_bom_item(): void
|
|||||||
'id' => $bomItem->id,
|
'id' => $bomItem->id,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user