From b6d2b9942e2984383e186a63c6714d51c1b3fda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B6=8C=ED=98=81=EC=84=B1?= Date: Sat, 7 Mar 2026 02:59:49 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20[=EC=9D=B8=ED=94=84=EB=9D=BC]=20Slack?= =?UTF-8?q?=20=EC=B1=84=EB=84=90=20=EB=B6=84=EB=A6=AC=20+=20logging=20?= =?UTF-8?q?=EA=B6=8C=ED=95=9C=20+=20=EB=AC=B8=EC=84=9C=20=EA=B0=B1?= =?UTF-8?q?=EC=8B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Slack 알림 채널: product_infra → deploy_api - logging.php daily/api 채널 permission 0664 추가 - CLAUDE.md, INDEX.md, 변경이력 문서 갱신 Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 1 + LOGICAL_RELATIONSHIPS.md | 65 ++++++++++++++++--- config/logging.php | 2 + config/services.php | 2 +- docs/INDEX.md | 4 +- ...251230_2339_quote_calculation_mng_logic.md | 2 +- ...0260102_1300_quote_bom_bulk_calculation.md | 4 +- package-lock.json | 2 +- 8 files changed, 67 insertions(+), 15 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 2b6924c..402eac7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -509,6 +509,7 @@ ### 2. Multi-tenancy & Models - SoftDeletes by default - Common columns: tenant_id, created_by, updated_by, deleted_by (COMMENT required) - FK constraints: Created during design, minimal in production +- **🔴 쿼리 수정 시 모델 스코프 우선**: `where('컬럼', '값')` 하드코딩 전에 반드시 모델에 정의된 스코프(scopeActive 등)를 먼저 확인하고, 스코프가 있으면 `Model::active()` 형태로 사용할 것 ### 3. Middleware Stack - ApiKeyMiddleware, CheckSwaggerAuth, CorsMiddleware, CheckPermission, PermMapper diff --git a/LOGICAL_RELATIONSHIPS.md b/LOGICAL_RELATIONSHIPS.md index 3f6f735..0e95e5b 100644 --- a/LOGICAL_RELATIONSHIPS.md +++ b/LOGICAL_RELATIONSHIPS.md @@ -1,6 +1,6 @@ # 논리적 데이터베이스 관계 문서 -> **자동 생성**: 2026-02-21 16:28:35 +> **자동 생성**: 2026-03-07 02:57:21 > **소스**: Eloquent 모델 관계 분석 ## 📊 모델별 관계 현황 @@ -580,17 +580,10 @@ ### roles **모델**: `App\Models\Permissions\Role` - **tenant()**: belongsTo → `tenants` -- **menuPermissions()**: hasMany → `role_menu_permissions` - **userRoles()**: hasMany → `user_roles` - **users()**: belongsToMany → `users` - **permissions()**: belongsToMany → `permissions` -### role_menu_permissions -**모델**: `App\Models\Permissions\RoleMenuPermission` - -- **role()**: belongsTo → `roles` -- **menu()**: belongsTo → `menus` - ### popups **모델**: `App\Models\Popups\Popup` @@ -637,6 +630,7 @@ ### work_orders - **stepProgress()**: hasMany → `work_order_step_progress` - **materialInputs()**: hasMany → `work_order_material_inputs` - **shipments()**: hasMany → `shipments` +- **inspections()**: hasMany → `inspections` - **bendingDetail()**: hasOne → `work_order_bending_details` - **documents()**: morphMany → `documents` @@ -743,6 +737,7 @@ ### push_notification_settings ### inspections **모델**: `App\Models\Qualitys\Inspection` +- **workOrder()**: belongsTo → `work_orders` - **item()**: belongsTo → `items` - **inspector()**: belongsTo → `users` - **creator()**: belongsTo → `users` @@ -758,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` @@ -836,6 +863,7 @@ ### approvals - **steps()**: hasMany → `approval_steps` - **approverSteps()**: hasMany → `approval_steps` - **referenceSteps()**: hasMany → `approval_steps` +- **linkable()**: morphTo → `(Polymorphic)` ### approval_forms **모델**: `App\Models\Tenants\ApprovalForm` @@ -933,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` @@ -961,7 +999,10 @@ ### leave_policys ### loans **모델**: `App\Models\Tenants\Loan` +- **user()**: belongsTo → `users` - **withdrawal()**: belongsTo → `withdrawals` +- **creator()**: belongsTo → `users` +- **updater()**: belongsTo → `users` ### payments **모델**: `App\Models\Tenants\Payment` @@ -1043,6 +1084,7 @@ ### shipments - **creator()**: belongsTo → `users` - **updater()**: belongsTo → `users` - **items()**: hasMany → `shipment_items` +- **vehicleDispatches()**: hasMany → `shipment_vehicle_dispatches` ### shipment_items **모델**: `App\Models\Tenants\ShipmentItem` @@ -1050,6 +1092,11 @@ ### shipment_items - **shipment()**: belongsTo → `shipments` - **stockLot()**: belongsTo → `stock_lots` +### shipment_vehicle_dispatchs +**모델**: `App\Models\Tenants\ShipmentVehicleDispatch` + +- **shipment()**: belongsTo → `shipments` + ### sites **모델**: `App\Models\Tenants\Site` @@ -1147,6 +1194,8 @@ ### tenant_user_profiles ### today_issues **모델**: `App\Models\Tenants\TodayIssue` +- **reader()**: belongsTo → `users` +- **targetUser()**: belongsTo → `users` ### withdrawals **모델**: `App\Models\Tenants\Withdrawal` 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/config/services.php b/config/services.php index 3865719..6a99ace 100644 --- a/config/services.php +++ b/config/services.php @@ -43,7 +43,7 @@ */ 'gemini' => [ 'api_key' => env('GEMINI_API_KEY'), - 'model' => env('GEMINI_MODEL', 'gemini-2.0-flash'), + 'model' => env('GEMINI_MODEL', 'gemini-2.5-flash'), 'base_url' => env('GEMINI_BASE_URL', 'https://generativelanguage.googleapis.com/v1beta'), ], 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 diff --git a/package-lock.json b/package-lock.json index 6898565..bb18a55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "api", + "name": "sam-api", "lockfileVersion": 3, "requires": true, "packages": {