feat: Item Master 하이브리드 구조 전환 및 독립 API 추가
- CASCADE FK → 독립 엔티티 + entity_relationships 링크 테이블 - 독립 API 10개 추가 (섹션/필드/BOM CRUD, clone, usage) - SectionTemplate 모델 제거 → ItemSection.is_template 통합 - 페이지-섹션, 섹션-필드, 섹션-BOM 링크/언링크 API 14개 추가 - Swagger 문서 업데이트
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# 논리적 데이터베이스 관계 문서
|
||||
|
||||
> **자동 생성**: 2025-11-24 19:27:59
|
||||
> **자동 생성**: 2025-11-26 14:00:30
|
||||
> **소스**: Eloquent 모델 관계 분석
|
||||
|
||||
## 📊 모델별 관계 현황
|
||||
@@ -128,6 +128,12 @@ ### custom_tabs
|
||||
|
||||
- **columnSetting()**: hasOne → `tab_columns`
|
||||
|
||||
### entity_relationships
|
||||
**모델**: `App\Models\ItemMaster\EntityRelationship`
|
||||
|
||||
- **parent()**: morphTo → `(Polymorphic)`
|
||||
- **child()**: morphTo → `(Polymorphic)`
|
||||
|
||||
### item_bom_items
|
||||
**모델**: `App\Models\ItemMaster\ItemBomItem`
|
||||
|
||||
@@ -142,6 +148,9 @@ ### item_pages
|
||||
**모델**: `App\Models\ItemMaster\ItemPage`
|
||||
|
||||
- **sections()**: hasMany → `item_sections`
|
||||
- **sectionRelationships()**: hasMany → `entity_relationships`
|
||||
- **fieldRelationships()**: hasMany → `entity_relationships`
|
||||
- **allRelationships()**: hasMany → `entity_relationships`
|
||||
|
||||
### item_sections
|
||||
**모델**: `App\Models\ItemMaster\ItemSection`
|
||||
@@ -149,6 +158,9 @@ ### item_sections
|
||||
- **page()**: belongsTo → `item_pages`
|
||||
- **fields()**: hasMany → `item_fields`
|
||||
- **bomItems()**: hasMany → `item_bom_items`
|
||||
- **fieldRelationships()**: hasMany → `entity_relationships`
|
||||
- **bomRelationships()**: hasMany → `entity_relationships`
|
||||
- **allChildRelationships()**: hasMany → `entity_relationships`
|
||||
|
||||
### tab_columns
|
||||
**모델**: `App\Models\ItemMaster\TabColumn`
|
||||
|
||||
Reference in New Issue
Block a user