fix:수정
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# 논리적 데이터베이스 관계 문서
|
||||
|
||||
> **자동 생성**: 2026-01-19 20:29:00
|
||||
> **자동 생성**: 2026-01-20 20:15:39
|
||||
> **소스**: Eloquent 모델 관계 분석
|
||||
|
||||
## 📊 모델별 관계 현황
|
||||
@@ -26,15 +26,6 @@ ### bad_debt_memos
|
||||
- **badDebt()**: belongsTo → `bad_debts`
|
||||
- **creator()**: belongsTo → `users`
|
||||
|
||||
### biddings
|
||||
**모델**: `App\Models\Bidding\Bidding`
|
||||
|
||||
- **quote()**: belongsTo → `quotes`
|
||||
- **client()**: belongsTo → `clients`
|
||||
- **bidder()**: belongsTo → `users`
|
||||
- **creator()**: belongsTo → `users`
|
||||
- **updater()**: belongsTo → `users`
|
||||
|
||||
### boards
|
||||
**모델**: `App\Models\Boards\Board`
|
||||
|
||||
@@ -79,6 +70,7 @@ ### categorys
|
||||
|
||||
- **parent()**: belongsTo → `categories`
|
||||
- **children()**: hasMany → `categories`
|
||||
- **products()**: hasMany → `products`
|
||||
- **categoryFields()**: hasMany → `category_fields`
|
||||
|
||||
### category_fields
|
||||
@@ -139,37 +131,6 @@ ### contracts
|
||||
- **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`
|
||||
|
||||
@@ -263,7 +224,6 @@ ### item_receipts
|
||||
**모델**: `App\Models\Items\ItemReceipt`
|
||||
|
||||
- **item()**: belongsTo → `items`
|
||||
- **creator()**: belongsTo → `users`
|
||||
|
||||
### login_tokens
|
||||
**모델**: `App\Models\LoginToken`
|
||||
@@ -281,6 +241,31 @@ ### main_request_flows
|
||||
- **mainRequest()**: belongsTo → `main_requests`
|
||||
- **flowable()**: morphTo → `(Polymorphic)`
|
||||
|
||||
### materials
|
||||
**모델**: `App\Models\Materials\Material`
|
||||
|
||||
- **category()**: belongsTo → `categories`
|
||||
- **receipts()**: hasMany → `material_receipts`
|
||||
- **lots()**: hasMany → `lots`
|
||||
- **files()**: morphMany → `files`
|
||||
|
||||
### material_inspections
|
||||
**모델**: `App\Models\Materials\MaterialInspection`
|
||||
|
||||
- **receipt()**: belongsTo → `material_receipts`
|
||||
- **items()**: hasMany → `material_inspection_items`
|
||||
|
||||
### material_inspection_items
|
||||
**모델**: `App\Models\Materials\MaterialInspectionItem`
|
||||
|
||||
- **inspection()**: belongsTo → `material_inspections`
|
||||
|
||||
### material_receipts
|
||||
**모델**: `App\Models\Materials\MaterialReceipt`
|
||||
|
||||
- **material()**: belongsTo → `materials`
|
||||
- **inspections()**: hasMany → `material_inspections`
|
||||
|
||||
### users
|
||||
**모델**: `App\Models\Members\User`
|
||||
|
||||
@@ -347,13 +332,10 @@ ### orders
|
||||
**모델**: `App\Models\Orders\Order`
|
||||
|
||||
- **quote()**: belongsTo → `quotes`
|
||||
- **client()**: belongsTo → `clients`
|
||||
- **item()**: belongsTo → `items`
|
||||
- **items()**: hasMany → `order_items`
|
||||
- **histories()**: hasMany → `order_histories`
|
||||
- **versions()**: hasMany → `order_versions`
|
||||
- **workOrders()**: hasMany → `work_orders`
|
||||
- **shipments()**: hasMany → `shipments`
|
||||
|
||||
### order_historys
|
||||
**모델**: `App\Models\Orders\OrderHistory`
|
||||
@@ -432,7 +414,6 @@ ### work_orders
|
||||
**모델**: `App\Models\Production\WorkOrder`
|
||||
|
||||
- **salesOrder()**: belongsTo → `orders`
|
||||
- **process()**: belongsTo → `processes`
|
||||
- **assignee()**: belongsTo → `users`
|
||||
- **team()**: belongsTo → `departments`
|
||||
- **creator()**: belongsTo → `users`
|
||||
@@ -441,7 +422,6 @@ ### work_orders
|
||||
- **primaryAssignee()**: hasMany → `work_order_assignees`
|
||||
- **items()**: hasMany → `work_order_items`
|
||||
- **issues()**: hasMany → `work_order_issues`
|
||||
- **shipments()**: hasMany → `shipments`
|
||||
- **bendingDetail()**: hasOne → `work_order_bending_details`
|
||||
|
||||
### work_order_assignees
|
||||
@@ -477,6 +457,18 @@ ### work_results
|
||||
- **creator()**: belongsTo → `users`
|
||||
- **updater()**: belongsTo → `users`
|
||||
|
||||
### common_codes
|
||||
**모델**: `App\Models\Products\CommonCode`
|
||||
|
||||
- **parent()**: belongsTo → `common_codes`
|
||||
- **children()**: hasMany → `common_codes`
|
||||
|
||||
### parts
|
||||
**모델**: `App\Models\Products\Part`
|
||||
|
||||
- **category()**: belongsTo → `common_codes`
|
||||
- **partType()**: belongsTo → `common_codes`
|
||||
|
||||
### prices
|
||||
**모델**: `App\Models\Products\Price`
|
||||
|
||||
@@ -488,6 +480,23 @@ ### price_revisions
|
||||
|
||||
- **price()**: belongsTo → `prices`
|
||||
|
||||
### products
|
||||
**모델**: `App\Models\Products\Product`
|
||||
|
||||
- **category()**: belongsTo → `categories`
|
||||
- **componentLines()**: hasMany → `product_components`
|
||||
- **parentLines()**: hasMany → `product_components`
|
||||
- **children()**: belongsToMany → `products`
|
||||
- **parents()**: belongsToMany → `products`
|
||||
- **files()**: morphMany → `files`
|
||||
|
||||
### product_components
|
||||
**모델**: `App\Models\Products\ProductComponent`
|
||||
|
||||
- **parentProduct()**: belongsTo → `products`
|
||||
- **product()**: belongsTo → `products`
|
||||
- **material()**: belongsTo → `materials`
|
||||
|
||||
### push_device_tokens
|
||||
**모델**: `App\Models\PushDeviceToken`
|
||||
|
||||
@@ -500,8 +509,6 @@ ### inspections
|
||||
**모델**: `App\Models\Qualitys\Inspection`
|
||||
|
||||
- **item()**: belongsTo → `items`
|
||||
- **inspector()**: belongsTo → `users`
|
||||
- **creator()**: belongsTo → `users`
|
||||
|
||||
### lots
|
||||
**모델**: `App\Models\Qualitys\Lot`
|
||||
@@ -520,13 +527,11 @@ ### quotes
|
||||
- **client()**: belongsTo → `clients`
|
||||
- **item()**: belongsTo → `items`
|
||||
- **order()**: belongsTo → `orders`
|
||||
- **siteBriefing()**: belongsTo → `site_briefings`
|
||||
- **finalizer()**: belongsTo → `users`
|
||||
- **creator()**: belongsTo → `users`
|
||||
- **updater()**: belongsTo → `users`
|
||||
- **items()**: hasMany → `quote_items`
|
||||
- **revisions()**: hasMany → `quote_revisions`
|
||||
- **orders()**: hasMany → `orders`
|
||||
|
||||
### quote_formulas
|
||||
**모델**: `App\Models\Quote\QuoteFormula`
|
||||
@@ -769,8 +774,6 @@ ### setting_field_defs
|
||||
### shipments
|
||||
**모델**: `App\Models\Tenants\Shipment`
|
||||
|
||||
- **order()**: belongsTo → `orders`
|
||||
- **workOrder()**: belongsTo → `work_orders`
|
||||
- **creator()**: belongsTo → `users`
|
||||
- **updater()**: belongsTo → `users`
|
||||
- **items()**: hasMany → `shipment_items`
|
||||
@@ -788,15 +791,6 @@ ### sites
|
||||
- **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`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user