feat: expense_accounts 테이블 및 모델 생성 (복리후생비/접대비용)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# 논리적 데이터베이스 관계 문서
|
||||
|
||||
> **자동 생성**: 2026-01-20 20:15:39
|
||||
> **자동 생성**: 2026-01-21 10:38:32
|
||||
> **소스**: Eloquent 모델 관계 분석
|
||||
|
||||
## 📊 모델별 관계 현황
|
||||
@@ -26,6 +26,15 @@ ### 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`
|
||||
|
||||
@@ -128,6 +137,38 @@ ### contracts
|
||||
|
||||
- **contractManager()**: belongsTo → `users`
|
||||
- **constructionPm()**: belongsTo → `users`
|
||||
- **creator()**: belongsTo → `users`
|
||||
- **updater()**: belongsTo → `users`
|
||||
- **handoverReport()**: hasOne → `handover_reports`
|
||||
|
||||
### 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`
|
||||
|
||||
@@ -224,6 +265,7 @@ ### item_receipts
|
||||
**모델**: `App\Models\Items\ItemReceipt`
|
||||
|
||||
- **item()**: belongsTo → `items`
|
||||
- **creator()**: belongsTo → `users`
|
||||
|
||||
### login_tokens
|
||||
**모델**: `App\Models\LoginToken`
|
||||
@@ -332,10 +374,14 @@ ### orders
|
||||
**모델**: `App\Models\Orders\Order`
|
||||
|
||||
- **quote()**: belongsTo → `quotes`
|
||||
- **client()**: belongsTo → `clients`
|
||||
- **writer()**: belongsTo → `users`
|
||||
- **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`
|
||||
@@ -414,6 +460,7 @@ ### work_orders
|
||||
**모델**: `App\Models\Production\WorkOrder`
|
||||
|
||||
- **salesOrder()**: belongsTo → `orders`
|
||||
- **process()**: belongsTo → `processes`
|
||||
- **assignee()**: belongsTo → `users`
|
||||
- **team()**: belongsTo → `departments`
|
||||
- **creator()**: belongsTo → `users`
|
||||
@@ -422,6 +469,7 @@ ### 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
|
||||
@@ -509,6 +557,8 @@ ### inspections
|
||||
**모델**: `App\Models\Qualitys\Inspection`
|
||||
|
||||
- **item()**: belongsTo → `items`
|
||||
- **inspector()**: belongsTo → `users`
|
||||
- **creator()**: belongsTo → `users`
|
||||
|
||||
### lots
|
||||
**모델**: `App\Models\Qualitys\Lot`
|
||||
@@ -527,11 +577,13 @@ ### 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`
|
||||
@@ -774,6 +826,8 @@ ### 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`
|
||||
@@ -791,6 +845,15 @@ ### 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