From ff8553055c20e407827a94002bcfab3f8b0e8d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Fri, 6 Mar 2026 21:09:40 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20[API]=20logging,=20docs,=20seeder=20?= =?UTF-8?q?=EB=93=B1=20=EB=B6=80=EC=88=98=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - LOGICAL_RELATIONSHIPS.md 보완 - Legacy5130Calculator 수정 - logging.php 설정 추가 - KyungdongItemSeeder 수정 - docs/INDEX.md, changes 문서 경로 수정 Co-Authored-By: Claude Opus 4.6 --- .../comprehensive-analysis-fix-2025-12-27.md | 2 +- .serena/memories/db-backup-state.md | 2 +- .../memories/quote-bom-bulk-api-phase-1.2.md | 8 ++-- LOGICAL_RELATIONSHIPS.md | 44 ++++++++++++++++++- app/Helpers/Legacy5130Calculator.php | 2 +- config/logging.php | 2 + .../seeders/Kyungdong/KyungdongItemSeeder.php | 2 +- docs/INDEX.md | 4 +- ...251230_2339_quote_calculation_mng_logic.md | 2 +- ...0260102_1300_quote_bom_bulk_calculation.md | 4 +- 10 files changed, 58 insertions(+), 14 deletions(-) diff --git a/.serena/memories/comprehensive-analysis-fix-2025-12-27.md b/.serena/memories/comprehensive-analysis-fix-2025-12-27.md index 2a9077e..659a81e 100644 --- a/.serena/memories/comprehensive-analysis-fix-2025-12-27.md +++ b/.serena/memories/comprehensive-analysis-fix-2025-12-27.md @@ -54,4 +54,4 @@ ## 관련 파일 - `api/app/Services/ComprehensiveAnalysisService.php` - `api/database/seeders/ComprehensiveAnalysisSeeder.php` -- `docs/plans/react-mock-remaining-tasks.md` +- `docs/dev/dev_plans/react-mock-remaining-tasks.md` diff --git a/.serena/memories/db-backup-state.md b/.serena/memories/db-backup-state.md index 3970856..e872408 100644 --- a/.serena/memories/db-backup-state.md +++ b/.serena/memories/db-backup-state.md @@ -15,7 +15,7 @@ ## Phase 구성 - Phase 5: MNG 관리자 패널 (4항목) — mng/ /system/alerts ## 핵심 파일 -- 계획 문서: docs/plans/db-backup-system-plan.md +- 계획 문서: docs/dev/dev_plans/db-backup-system-plan.md - 개발서버: 114.203.209.83 (SSH: hskwon) - DB: sam (메인) + sam_stat (통계) - Slack 웹훅: api/.env → LOG_SLACK_WEBHOOK_URL (이미 설정됨) diff --git a/.serena/memories/quote-bom-bulk-api-phase-1.2.md b/.serena/memories/quote-bom-bulk-api-phase-1.2.md index c212391..db4e17e 100644 --- a/.serena/memories/quote-bom-bulk-api-phase-1.2.md +++ b/.serena/memories/quote-bom-bulk-api-phase-1.2.md @@ -16,7 +16,7 @@ ### 생성된 파일 | 파일 | 설명 | |------|------| | `app/Http/Requests/Quote/QuoteBomBulkCalculateRequest.php` | 다건 BOM 산출 FormRequest | -| `api/docs/changes/20260102_1300_quote_bom_bulk_calculation.md` | 변경 내용 문서 | +| `api/docs/dev/changes/20260102_1300_quote_bom_bulk_calculation.md` | 변경 내용 문서 | ### 수정된 파일 | 파일 | 설명 | @@ -93,9 +93,9 @@ ### QuoteCalculationService::calculateBomBulk() - 개별 품목 실패가 전체에 영향 없음 (예외 처리) ## 관련 문서 -- 계획 문서: `docs/plans/quote-calculation-api-plan.md` -- Phase 1.1 문서: `docs/changes/20260102_quote_bom_calculation_api.md` -- Phase 1.2 문서: `docs/changes/20260102_1300_quote_bom_bulk_calculation.md` +- 계획 문서: `docs/dev/dev_plans/quote-calculation-api-plan.md` +- Phase 1.1 문서: `docs/dev/changes/20260102_quote_bom_calculation_api.md` +- Phase 1.2 문서: `docs/dev/changes/20260102_1300_quote_bom_bulk_calculation.md` ## 다음 단계 - React 프론트엔드에서 `/calculate/bom/bulk` API 연동 diff --git a/LOGICAL_RELATIONSHIPS.md b/LOGICAL_RELATIONSHIPS.md index 1cf50df..a8ccbb8 100644 --- a/LOGICAL_RELATIONSHIPS.md +++ b/LOGICAL_RELATIONSHIPS.md @@ -1,6 +1,6 @@ # 논리적 데이터베이스 관계 문서 -> **자동 생성**: 2026-03-04 22:33:37 +> **자동 생성**: 2026-03-06 15:12:45 > **소스**: Eloquent 모델 관계 분석 ## 📊 모델별 관계 현황 @@ -753,6 +753,38 @@ ### lot_sales - **lot()**: belongsTo → `lots` +### performance_reports +**모델**: `App\Models\Qualitys\PerformanceReport` + +- **qualityDocument()**: belongsTo → `quality_documents` +- **confirmer()**: belongsTo → `users` +- **creator()**: belongsTo → `users` + +### quality_documents +**모델**: `App\Models\Qualitys\QualityDocument` + +- **client()**: belongsTo → `clients` +- **inspector()**: belongsTo → `users` +- **creator()**: belongsTo → `users` +- **documentOrders()**: hasMany → `quality_document_orders` +- **locations()**: hasMany → `quality_document_locations` +- **performanceReport()**: hasOne → `performance_reports` + +### quality_document_locations +**모델**: `App\Models\Qualitys\QualityDocumentLocation` + +- **qualityDocument()**: belongsTo → `quality_documents` +- **qualityDocumentOrder()**: belongsTo → `quality_document_orders` +- **orderItem()**: belongsTo → `order_items` +- **document()**: belongsTo → `documents` + +### quality_document_orders +**모델**: `App\Models\Qualitys\QualityDocumentOrder` + +- **qualityDocument()**: belongsTo → `quality_documents` +- **order()**: belongsTo → `orders` +- **locations()**: hasMany → `quality_document_locations` + ### quotes **모델**: `App\Models\Quote\Quote` @@ -929,6 +961,16 @@ ### expense_accounts - **vendor()**: belongsTo → `clients` +### journal_entrys +**모델**: `App\Models\Tenants\JournalEntry` + +- **lines()**: hasMany → `journal_entry_lines` + +### journal_entry_lines +**모델**: `App\Models\Tenants\JournalEntryLine` + +- **journalEntry()**: belongsTo → `journal_entries` + ### leaves **모델**: `App\Models\Tenants\Leave` diff --git a/app/Helpers/Legacy5130Calculator.php b/app/Helpers/Legacy5130Calculator.php index 1d8c59e..5c2f723 100644 --- a/app/Helpers/Legacy5130Calculator.php +++ b/app/Helpers/Legacy5130Calculator.php @@ -14,7 +14,7 @@ * - 두께 매핑 (normalizeThickness) * - 면적 계산 (calculateArea) * - * @see docs/plans/5130-sam-data-migration-plan.md 섹션 4.5 + * @see docs/dev_plans/5130-sam-data-migration-plan.md 섹션 4.5 */ class Legacy5130Calculator { diff --git a/config/logging.php b/config/logging.php index 4ed83fc..7955199 100644 --- a/config/logging.php +++ b/config/logging.php @@ -67,6 +67,7 @@ 'daily' => [ 'driver' => 'daily', + 'permission' => 0664, 'path' => storage_path('logs/laravel.log'), 'level' => env('LOG_LEVEL', 'debug'), 'days' => env('LOG_DAILY_DAYS', 14), @@ -138,6 +139,7 @@ */ 'api' => [ 'driver' => 'daily', + 'permission' => 0664, 'path' => storage_path('logs/api/api.log'), 'level' => 'info', 'days' => env('API_LOG_DAYS', 14), diff --git a/database/seeders/Kyungdong/KyungdongItemSeeder.php b/database/seeders/Kyungdong/KyungdongItemSeeder.php index 3c0f707..ef9de1b 100644 --- a/database/seeders/Kyungdong/KyungdongItemSeeder.php +++ b/database/seeders/Kyungdong/KyungdongItemSeeder.php @@ -17,7 +17,7 @@ * Phase 3.1: chandj.price_motor → items (SM) + prices 누락 품목 * Phase 3.2: chandj.price_raw_materials → items (RM) + prices 누락 품목 * - * @see docs/plans/kd-items-migration-plan.md + * @see docs/dev_plans/kd-items-migration-plan.md */ class KyungdongItemSeeder extends Seeder { diff --git a/docs/INDEX.md b/docs/INDEX.md index 948fb65..b80a841 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -37,7 +37,7 @@ ## 🔗 프로젝트 문서 (SAM/docs로 이동됨) | 이전 위치 | 새 위치 | 설명 | |-----------|---------|------| -| `analysis/` | `docs/data/analysis/` | Item DB 분석 문서 | +| `analysis/` | `docs/dev/data/analysis/` | Item DB 분석 문서 | | `front/` | `docs/front/` | 프론트엔드 요청 문서 | | `specs/` | `docs/specs/` | 기능 스펙 문서 | @@ -49,6 +49,6 @@ ## 📝 문서 추가 가이드 |-----------|-----------| | Swagger 스펙 | `api/docs/swagger/` | | API Flow 테스트 | `api/docs/api-flows/` 또는 `flow-tests/` | -| 프로젝트 분석 | `SAM/docs/data/` | +| 프로젝트 분석 | `SAM/docs/dev/data/` | | 기능 스펙 | `SAM/docs/specs/` | | 프론트 요청 | `SAM/docs/front/` | diff --git a/docs/changes/20251230_2339_quote_calculation_mng_logic.md b/docs/changes/20251230_2339_quote_calculation_mng_logic.md index ba01653..7571199 100644 --- a/docs/changes/20251230_2339_quote_calculation_mng_logic.md +++ b/docs/changes/20251230_2339_quote_calculation_mng_logic.md @@ -74,5 +74,5 @@ ## ⚠️ 배포 시 주의사항 - 테넌트별 초기 데이터 설정 필요 ## 🔗 관련 문서 -- `docs/plans/quote-calculation-api-plan.md` +- `docs/dev/dev_plans/quote-calculation-api-plan.md` - `mng/app/Services/Quote/FormulaEvaluatorService.php` (원본) diff --git a/docs/changes/20260102_1300_quote_bom_bulk_calculation.md b/docs/changes/20260102_1300_quote_bom_bulk_calculation.md index a2fdb9c..8f5f65a 100644 --- a/docs/changes/20260102_1300_quote_bom_bulk_calculation.md +++ b/docs/changes/20260102_1300_quote_bom_bulk_calculation.md @@ -2,7 +2,7 @@ # 변경 내용 요약 **날짜:** 2026-01-02 13:00 **작업명:** Phase 1.2 입력 변수 처리 - React QuoteItem 매핑 -**계획 문서:** docs/plans/quote-calculation-api-plan.md +**계획 문서:** docs/dev/dev_plans/quote-calculation-api-plan.md ## 변경 개요 @@ -151,4 +151,4 @@ ## API 사용 예시 ## 관련 문서 - Phase 1.1: `20251230_2339_quote_calculation_mng_logic.md` (BOM 단건 산출) -- 계획 문서: `docs/plans/quote-calculation-api-plan.md` \ No newline at end of file +- 계획 문서: `docs/dev/dev_plans/quote-calculation-api-plan.md` \ No newline at end of file