247 Commits

Author SHA1 Message Date
349917f019 refactor(work-orders): 코드 리뷰 기반 전면 개선
## Critical 수정
- Multi-tenancy: WorkOrderItem, BendingDetail, Issue에 BelongsToTenant 적용
- 감사 로그: 상태변경, 품목수정, 이슈 등록/해결 시 로깅 추가
- 상태 전이 규칙: STATUS_TRANSITIONS + canTransitionTo() 구현

## High 수정
- 다중 담당자: work_order_assignees 피벗 테이블 및 관계 추가
- 부분 수정: 품목 ID 기반 upsert/delete 로직 구현

## 변경 파일
- Models: WorkOrder, WorkOrderAssignee(신규), 하위 모델들
- Services: WorkOrderService (assign, update 메서드 개선)
- Migrations: tenant_id 추가, assignees 테이블 생성

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 08:32:44 +09:00
18aa745518 feat: 공정 관리 API 개선 및 ProcessItem 추가
- ProcessItem 모델 및 마이그레이션 추가
- Process 요청/서비스 로직 수정
- Swagger API 문서 추가

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 20:23:52 +09:00
1410cf725a feat(API): 견적-주문 연동 필드 및 마이그레이션 추가
- Order, OrderItem 모델에 견적 연동 필드 추가
- Quote 모델에 order_id 관계 추가
- QuoteService 개선
- 관련 마이그레이션 파일 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 15:56:46 +09:00
02e268e49a docs(API): 견적 BOM 산출 작업 현황 및 Item 모델 주석 추가
- Item 모델 item_category 필드 주석 추가
- CURRENT_WORKS.md 견적 자동산출 작업 현황 업데이트
- LOGICAL_RELATIONSHIPS.md 관계 문서 업데이트

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-02 21:06:06 +09:00
4fa38e39e6 feat(API): 채권현황 동적월 지원 및 year=0 파라미터 버그 수정
- ReceivablesController: boolean 유효성 검사를 string|in:true,false,1,0으로 변경
  - 쿼리 문자열의 "true" 문자열을 올바르게 처리
  - 디버깅용 Log::info 추가
- ReceivablesService: 동적 월 기간 지원
  - recent_year=true 시 최근 12개월 동적 계산
  - 월별 레이블 동적 생성 (예: 25.02, 25.03...)
  - 이월잔액(carry_forward_balance) 계산 추가
- Client 모델: is_overdue, memo 필드 추가
- 마이그레이션: clients 테이블에 is_overdue 컬럼 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-02 14:47:51 +09:00
7566814876 feat: Phase 1.1 - MNG 견적 계산 로직 API 동기화
- CategoryGroup 모델 추가 (카테고리별 단가 계산)
- FormulaEvaluatorService에 10단계 BOM 계산 로직 추가
- calculateBomWithDebug, calculateCategoryPrice 등 주요 메서드 구현
- MNG 시뮬레이터와 동일한 계산 결과 보장

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 23:45:22 +09:00
325a255b91 fix: work_days 숫자/문자열 호환 처리 추가
- WorkSetting 모델에 workDays Attribute accessor/mutator 추가
- DB에 숫자 배열 [1,2,3,4,5]로 저장된 경우 문자열 ["mon","tue",...] 로 변환
- 저장 시에도 항상 문자열 배열로 정규화
- 기존 데이터 호환성 보장

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-30 21:42:20 +09:00
f896f267e7 fix(API): 역할 권한 서비스 버그 수정
- RolePermissionService: Menu 모델 네임스페이스 수정
  - \App\Models\Menus\Menu → \App\Models\Commons\Menu
- RolePermissionService: 존재하지 않는 컬럼 수정
  - code, path → url
- RoleService: 커스텀 Role 모델 사용
  - Spatie\Permission\Models\Role → App\Models\Permissions\Role
- Role 모델: users() 관계 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-30 20:41:33 +09:00
d6e18fb54e feat(API): 직책/직원/근태 관리 API 개선
- Position 모델: key 필드 추가 및 마이그레이션
- PositionSeeder: 기본 직책 시더 추가
- TenantUserProfile: 프로필 이미지 관련 필드 추가
- Employee Request: 직원 등록/수정 요청 검증 강화
- EmployeeService: 직원 관리 서비스 로직 개선
- AttendanceService: 근태 관리 서비스 개선

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 17:25:13 +09:00
08c9a74cbc feat(API): 역할/권한 관리 API 개선
- RoleController: 역할 CRUD API 개선
- RolePermissionController: 역할별 권한 설정 API 추가
- RoleService/RolePermissionService: 비즈니스 로직 분리
- Role 모델: is_hidden 필드 추가 (시스템 역할 숨김)
- 역할 숨김 마이그레이션 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 17:24:19 +09:00
75576323fe feat(API): Position API 추가 (직급/직책 통합)
- Position 모델 생성 (type: rank | title)
- PositionService: CRUD + reorder 구현
- PositionController: REST API 엔드포인트
- Swagger 문서 작성 (PositionApi.php)
- 마이그레이션: positions 테이블 + common_codes 등록
- routes/api.php에 라우트 등록

Phase L-3 (직급관리), L-4 (직책관리) 백엔드 완료

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 11:18:17 +09:00
39538aa812 refactor: 검사 테이블 통합 및 출하 대시보드 수정
## 변경 사항

### 검사 시스템 통합
- 레거시 검사 모델 삭제 (MaterialInspection, MaterialInspectionItem, MaterialReceipt)
- 통합 검사 모델 추가 (Inspection.php) - IQC/PQC/FQC 지원
- 품목 입고 모델 추가 (ItemReceipt.php)
- PricingService에서 ItemReceipt 참조로 변경

### 출하 대시보드 수정
- ShipmentService stats() 프론트엔드 호환 필드 추가
  - today_shipment_count, scheduled_count, shipping_count, urgent_count

### 마이그레이션
- inspections 테이블 생성 (IQC/PQC/FQC 통합)
- item_receipts로 테이블명 변경

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 19:31:51 +09:00
a639e0fa60 feat(SAM/API): Stock 모델에 Item 관계 추가 및 시더 생성
- Stock 모델에 item_id 필드 및 item() 관계 추가
- StockService에 item eager loading 적용
- stocks 테이블 item_id 마이그레이션 추가
- StockReceivingSeeder 더미 데이터 시더 생성
- Process 모델 Traits 경로 수정

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 15:31:00 +09:00
63d8eb5a71 feat: 1:1 문의 댓글 API 개선
- BoardComment 모델에 replies() 관계 추가 (children 별칭)
- PostService 댓글 CRUD에 user eager loading 추가
  - getComments(): with(['user', 'replies.user'])
  - createComment(): $comment->load('user')
  - updateComment(): $comment->fresh('user')
- 댓글 작성자 이름 정상 표시

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 09:23:38 +09:00
bd8adffb34 fix(post): 게시글 첨부파일 조회 오류 수정
문제:
- morphMany 사용 시 "No morph map defined" 에러 발생
- 시스템 게시판 파일 조회 시 tenant_id 불일치로 빈 배열 반환

해결:
- AppServiceProvider: Post 모델을 enforceMorphMap에 등록
- Post::files(): morphMany → hasMany(document_type/document_id 기반)로 변경
- Post::files(): TenantScope 제외하여 시스템 게시판 파일 조회 가능

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 01:42:47 +09:00
472cf53289 fix: 종합분석 오늘의 이슈 승인/반려 버그 수정
- ComprehensiveAnalysisService::getTodayIssue() 수정
  - 현재 사용자가 결재자인 문서만 조회하도록 whereHas 조건 추가
  - 이전: 테넌트의 모든 대기 결재 표시 → "결재 순서가 아닙니다" 오류
  - 수정: 현재 로그인 사용자가 approver_id인 문서만 표시

- ComprehensiveAnalysisSeeder 테스트 데이터 수정
  - Tenant 287 (프론트_테스트회사) 기준
  - User 33 (홍킬동) 기준으로 결재 단계 생성

- Client 모델 재무 컬럼 추가 (마이그레이션 포함)
  - outstanding_balance: 미수금
  - credit_limit: 여신한도

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 18:47:46 +09:00
71a33d79cc feat: 매입유형(purchase_type) 필드 추가
- 마이그레이션: purchases 테이블에 purchase_type 컬럼 추가
- Purchase 모델: $fillable 및 PURCHASE_TYPES 상수 추가
- StorePurchaseRequest: purchase_type validation 추가
- UpdatePurchaseRequest: purchase_type validation 추가
- PurchaseService: store/update에 purchase_type 처리 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-27 16:47:26 +09:00
3994e0faf1 feat: 공정관리 API 구현 (L-1)
- processes, process_classification_rules 테이블 마이그레이션
- Process, ProcessClassificationRule 모델 (BelongsToTenant, SoftDeletes)
- ProcessService: CRUD + 통계/옵션/상태토글
- ProcessController + FormRequest 검증
- API 라우트 등록 (/v1/processes)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-26 18:58:44 +09:00
7fc11a2215 chore: Phase H, I API 라우트 및 공통 파일 업데이트
- routes/api.php: H-1~3, I-2~8 엔드포인트 추가
- error.php: 에러 메시지 키 추가 (en/ko)
- TenantUserProfile 모델 업데이트
- LOGICAL_RELATIONSHIPS.md 업데이트

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:48:37 +09:00
5c0f92d74a feat: I-8 휴가 정책 관리 API 구현
- LeavePolicyController: 휴가 정책 CRUD API
- LeavePolicyService: 정책 관리 로직
- LeavePolicy 모델: 다중 테넌트 지원
- FormRequest 검증 클래스
- Swagger 문서화
- leave_policies 테이블 마이그레이션

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:48:06 +09:00
e7862ed6e6 feat: I-3 법인카드 사용내역 API 구현
- CardTransactionController: 카드 거래내역 조회 API
- CardTransactionService: 카드 거래 조회 로직
- Withdrawal 모델 카드 필드 확장
- Swagger 문서화
- withdrawals 테이블 카드 필드 마이그레이션

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:46:48 +09:00
aca0902c26 feat: H-3 출하 관리 API 구현
- ShipmentController: 출하 CRUD 및 상태 관리 API
- ShipmentService: 출하 비즈니스 로직
- Shipment, ShipmentItem 모델
- FormRequest 검증 클래스
- Swagger 문서화
- shipments, shipment_items 테이블 마이그레이션

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:46:07 +09:00
5ec201b985 feat: H-2 재고 현황 API 구현
- StockController: 재고 조회 및 통계 API
- StockService: 재고 비즈니스 로직
- Stock, StockLot 모델: 재고/로트 관리
- Swagger 문서화
- stocks, stock_lots 테이블 마이그레이션

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:45:48 +09:00
43ccd1e6e0 feat: H-1 입고 관리 API 구현
- ReceivingController: CRUD 및 목록 조회 API
- ReceivingService: 입고 비즈니스 로직
- Receiving 모델: 다중 테넌트 지원
- FormRequest 검증 클래스
- Swagger 문서화
- receivings 테이블 마이그레이션

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:45:33 +09:00
84cce6742e feat: G-2 작업실적 관리 API 구현
- WorkResult 모델 생성 (Production 네임스페이스)
- WorkResultService 서비스 구현 (CRUD + 통계 + 토글)
- WorkResultController 컨트롤러 생성 (8개 엔드포인트)
- FormRequest 검증 클래스 (Store/Update)
- Swagger 문서 작성 (WorkResultApi.php)
- 라우트 추가 (/api/v1/work-results)
- i18n 메시지 추가 (work_result 키)

API Endpoints:
- GET /work-results - 목록 조회 (페이징, 필터링)
- GET /work-results/stats - 통계 조회
- GET /work-results/{id} - 상세 조회
- POST /work-results - 등록
- PUT /work-results/{id} - 수정
- DELETE /work-results/{id} - 삭제
- PATCH /work-results/{id}/inspection - 검사 상태 토글
- PATCH /work-results/{id}/packaging - 포장 상태 토글

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:18:08 +09:00
dd0f79b947 fix: 부서 트리 API 테넌트 필터링 및 사원 연동 수정
- DepartmentUser: Model → Pivot 상속 변경 (fromRawAttributes 에러 수정)
- Department: BelongsToTenant 트레이트 추가 (테넌트 필터링)
- Department.employees(): tenant_user_profiles 기반 사원 조회 관계 추가
- DepartmentService.tree(): department_user 대신 employees 사용
- users 형태로 변환하여 프론트엔드 호환성 유지

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-26 15:00:57 +09:00
05a53cdc8e feat: G-1 작업지시 관리 API 구현
- 작업지시 테이블 마이그레이션 (work_orders, work_order_items, work_order_bending_details, work_order_issues)
- 작업지시 모델 4개 (WorkOrder, WorkOrderItem, WorkOrderBendingDetail, WorkOrderIssue)
- WorkOrderService 비즈니스 로직 구현
- WorkOrderController REST API 엔드포인트 11개
- FormRequest 검증 클래스 5개
- Swagger API 문서화 완료

API Endpoints:
- GET /work-orders (목록)
- GET /work-orders/stats (통계)
- POST /work-orders (등록)
- GET /work-orders/{id} (상세)
- PUT /work-orders/{id} (수정)
- DELETE /work-orders/{id} (삭제)
- PATCH /work-orders/{id}/status (상태변경)
- PATCH /work-orders/{id}/assign (담당자배정)
- PATCH /work-orders/{id}/bending/toggle (벤딩토글)
- POST /work-orders/{id}/issues (이슈등록)
- PATCH /work-orders/{id}/issues/{issueId}/resolve (이슈해결)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-26 13:57:42 +09:00
1f5539db32 feat: I-1 미지급비용 관리 API 개발
- ExpectedExpense 모델 및 마이그레이션 생성
- ExpectedExpenseService 구현 (CRUD, 일괄삭제, 지급일 변경, 요약)
- ExpectedExpenseController REST API 구현
- FormRequest 검증 클래스 3개 생성
- Swagger API 문서 작성
- 라우트 추가 (8개 엔드포인트)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-26 13:23:07 +09:00
0fef26f42a feat: HR 모델 userProfile 관계 추가 및 서비스 개선
## 모델 개선
- Leave: userProfile relation 추가
- Salary: userProfile relation 추가
- TenantUserProfile: department, position 관계 및 label accessor 추가

## 서비스 개선
- LeaveService: userProfile eager loading 추가
- SalaryService: 사원 정보 조회 개선
- CardService: 관계 정리 및 개선
- AttendanceService: 조회 기능 개선

## 시더
- DummySalarySeeder 추가
- DummyCardSeeder 멀티테넌트 지원 개선
- DummyDataSeeder에 급여 시더 등록

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 01:32:07 +09:00
638e87b05d feat: 급여 관리 API 및 더미 시더 확장
- 급여 관리 API 추가 (SalaryController, SalaryService, Salary 모델)
  - 급여 목록/상세/등록/수정/삭제
  - 상태 변경 (scheduled/completed)
  - 일괄 상태 변경
  - 통계 조회
- 더미 시더 확장
  - 근태, 휴가, 부서, 사용자 시더 추가
  - 기존 시더 tenant_id/created_by/updated_by 필드 추가
- 부서 서비스 개선 (tree 조회 기능 추가)
- 카드 서비스 수정

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-25 03:48:32 +09:00
01d9ccaf57 feat: 휴가 부여현황 API 추가
- leave_grants 테이블 마이그레이션 추가
- LeaveGrant 모델 생성 (annual/monthly/reward/condolence/other 유형)
- LeaveService에 getGrants, storeGrant, destroyGrant 메서드 추가
- LeaveController에 grants, storeGrant, destroyGrant 엔드포인트 추가
- GET/POST/DELETE /api/v1/leaves/grants 라우트 추가
- 연차/월차 부여 시 LeaveBalance total_days 자동 갱신
2025-12-24 19:39:33 +09:00
3988372ca4 feat: 휴가 사용현황 전체 직원 목록 API 추가
- GET /api/v1/leaves/balances 엔드포인트 추가
- LeaveService.getAllBalances() 메서드 구현
- TenantUserProfile 기준 전체 활성 직원 조회
- LeaveBalance 서브쿼리로 연차 정보 LEFT JOIN
- 부서/검색/정렬 필터링 및 페이지네이션 지원
- User 모델에 tenantProfiles/tenantProfile 관계 추가
2025-12-24 19:29:15 +09:00
6ee3378377 feat: 매입 세금계산서 수취 토글 기능 추가
- Purchase 모델에 tax_invoice_received 필드 추가
- PurchaseService에 toggleTaxInvoice() 메서드 추가
- UpdatePurchaseRequest에 tax_invoice_received 검증 규칙 추가
- 마이그레이션: purchases 테이블에 tax_invoice_received 컬럼 추가
2025-12-24 16:16:53 +09:00
1e161c16b0 feat: 매출 세금계산서/거래명세서 토글 API 연동
- UpdateSaleRequest: tax_invoice_issued, transaction_statement_issued 필드 추가
- SaleService: 토글 필드 업데이트 로직 추가 (canEdit 우회)
- Sale 모델: fillable에 토글 필드 추가
- 마이그레이션: sales 테이블에 토글 컬럼 추가
2025-12-24 15:46:09 +09:00
8686b199ee feat: 더미 데이터 시더 추가 및 회계 관련 마이그레이션
- DummyDataSeeder 및 개별 시더 추가 (Client, BadDebt, Deposit 등)
- payments.paid_at nullable 마이그레이션
- subscriptions 취소 컬럼 추가
- clients 테이블 bad_debt 컬럼 제거
- PlanController, ClientService 수정
- 불필요한 claudedocs, flow-test 파일 정리
2025-12-24 08:54:52 +09:00
71123128ff feat: 어음 관리(Bill Management) API 추가
- BillController: 어음 CRUD + 상태변경 + 요약 API
- BillService: 비즈니스 로직 (멀티테넌트 지원)
- Bill, BillInstallment 모델: 날짜 포맷(Y-m-d) toArray 오버라이드
- FormRequest: Store/Update/UpdateStatus 유효성 검사
- Swagger 문서: BillApi.php
- 마이그레이션: bills, bill_installments 테이블
- DummyBillSeeder: 테스트 데이터 30건 + 차수 12건
- API Routes: /api/v1/bills 엔드포인트 7개
2025-12-23 23:42:02 +09:00
75be618f98 feat: [fcm] Admin FCM API 추가 - MNG에서 API 호출로 FCM 발송
- AdminFcmController, AdminFcmService 추가
- FormRequest 검증 (AdminFcmSendRequest 등)
- Swagger 문서 추가 (AdminFcmApi.php)
- ApiKeyMiddleware: admin/fcm/* 화이트리스트 추가
- FCM 에러 메시지 i18n 추가
2025-12-23 12:49:31 +09:00
a27b1b2091 feat: Phase 5.1-1 사용자 초대 + Phase 5.2 알림 설정 API 연동
- 사용자 초대 API: role 문자열 지원 추가 (React 호환)
- 알림 설정 API: 그룹 기반 계층 구조 구현
  - notification_setting_groups 테이블 추가
  - notification_setting_group_items 테이블 추가
  - notification_setting_group_states 테이블 추가
  - GET/PUT /api/v1/settings/notifications 엔드포인트 추가
- Pint 코드 스타일 정리
2025-12-22 17:42:59 +09:00
7781253491 feat: Phase 8.3 회사 추가 API 구현
- 사업자등록번호 유효성 검사 API (바로빌 연동)
- 회사 추가 신청/승인/반려 워크플로우
- 신청 승인 시 테넌트 자동 생성 및 사용자 연결
- 관리자용 신청 목록/상세 조회
- 사용자용 내 신청 목록 조회
- Swagger 문서 및 i18n 메시지 추가
2025-12-22 15:30:38 +09:00
8ab65e18d0 refactor: prices.item_type_code 통합 및 하드코딩 제거
- 레거시 PRODUCT/MATERIAL 값을 실제 item_type(FG, PT 등)으로 마이그레이션
- Price 모델에서 하드코딩된 ITEM_TYPE_* 상수 제거
- PricingService.getCost()에서 하드코딩된 자재 유형 배열을
  common_codes.attributes.is_material 플래그 조회로 변경
- common_codes item_type 그룹에 is_material 플래그 추가
  - FG, PT: is_material = false (제품)
  - SM, RM, CS: is_material = true (자재)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 17:22:51 +09:00
b2cc054309 fix: [models] Tenants 모델 관계 경로 오류 수정
- Client 관계: App\Models\Tenants\Client → App\Models\Orders\Client
  - Deposit, Withdrawal, Sale, Purchase 모델 수정
- User 관계: App\Models\User → App\Models\Members\User
  - Deposit, Withdrawal, Sale, Purchase, TaxInvoice, BarobillSetting, AiReport 모델 수정

Finance Deposits CRUD Test 통과 확인 (7/7 SUCCESS)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 04:12:57 +09:00
7bea6f2deb feat: MNG → DEV 자동 로그인 API 구현
- login_tokens 테이블 마이그레이션 생성
- LoginToken 모델 생성 (One-Time Token 관리)
- POST /api/v1/token-login 엔드포인트 추가
- 토큰 검증 후 access_token 발급, 1회용 토큰 삭제

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 13:43:04 +09:00
0d535ee4af feat: SystemFieldDefinition 시스템 필드 정의 기능 추가
- SystemFieldDefinition 모델 추가 (items/tenants/users 필드 정의)
- SystemFieldDefinitionSeeder 추가
- source_table 단독 인덱스 추가 (쿼리 성능 향상)
- LOGICAL_RELATIONSHIPS.md 자동 생성 문서 업데이트

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-20 12:35:03 +09:00
abaff1286e feat: Phase 8 SaaS 확장 - 구독관리/결제내역 API 추가
- 사용량 조회 API (GET /subscriptions/usage)
- 데이터 내보내기 API (POST/GET /subscriptions/export)
- 결제 명세서 API (GET /payments/{id}/statement)
- DataExport 모델 및 마이그레이션 추가
2025-12-19 16:53:49 +09:00
0d49e4cc75 refactor: 견적 산출 서비스 DB 기반으로 재작성
- Quote 수식 모델 추가 (mng 패턴 적용)
  - QuoteFormula: 수식 정의 (input/calculation/range/mapping)
  - QuoteFormulaCategory: 카테고리 정의
  - QuoteFormulaItem: 품목 출력 정의
  - QuoteFormulaRange: 범위별 값 정의
  - QuoteFormulaMapping: 매핑 값 정의

- FormulaEvaluatorService 확장
  - executeAll(): 카테고리별 수식 실행
  - evaluateRangeFormula/evaluateMappingFormula: QuoteFormula 기반 평가
  - getItemPrice(): prices 테이블 연동

- QuoteCalculationService DB 기반으로 재작성
  - 하드코딩된 품목 코드/로직 제거
  - quote_formulas 테이블 기반 동적 계산
  - getInputSchema(): DB 기반 입력 스키마 생성

- Price 모델 수정
  - items 테이블 연동 (products/materials 대체)
  - ITEM_TYPE 상수 업데이트 (FG/PT/RM/SM/CS)
2025-12-19 16:49:26 +09:00
4d3085e705 feat: 견적 산출 서비스 prices 테이블 연동
- Price 모델에 getCurrentPrice(), getSalesPriceByItemCode() 메서드 추가
- Price 모델에 STATUS_*, ITEM_TYPE_* 상수 추가
- QuoteCalculationService에 setTenantId(), getUnitPrice() 메서드 추가
- 스크린 품목 단가: 원단, 케이스, 브라켓, 인건비 prices 조회로 변경
- 철재 품목 단가: 철판, 용접, 표면처리, 가공비 prices 조회로 변경
- 모터 용량별 단가: 50W~300W prices 조회로 변경
- 모든 단가는 prices 조회 실패 시 기존 하드코딩 값을 fallback으로 사용
2025-12-19 16:20:38 +09:00
8f1292f7c4 feat: Phase 6.2 팝업관리 API 구현
- popups 테이블 마이그레이션 생성
- Popup 모델 (BelongsToTenant, SoftDeletes)
- PopupService CRUD 구현
- FormRequest 검증 (Store/Update)
- PopupController 6개 엔드포인트
- Swagger 문서 (PopupApi.php)
- PROJECT_DEVELOPMENT_POLICY.md 정책 준수
2025-12-19 16:14:04 +09:00
c0af888bed feat: Phase 6.1 악성채권 추심관리 API 구현
- 테이블 3개: bad_debts, bad_debt_documents, bad_debt_memos
- 모델 3개: BadDebt, BadDebtDocument, BadDebtMemo
- BadDebtService: CRUD, 요약 통계, 서류/메모 관리
- API 엔드포인트 11개 (목록, 등록, 상세, 수정, 삭제, 토글, 서류/메모 CRUD)
- Swagger 문서 작성 완료
2025-12-19 15:57:04 +09:00
3020026abf feat: Phase 5 API 개발 완료 (사용자 초대, 알림설정, 계정관리, 거래명세서)
5.1 사용자 초대 기능:
- UserInvitation 마이그레이션, 모델, 서비스, 컨트롤러, Swagger
- 초대 발송/수락/취소/재발송 API

5.2 알림설정 확장:
- NotificationSetting 마이그레이션, 모델, 서비스, 컨트롤러, Swagger
- 채널별/유형별 알림 설정 관리

5.3 계정정보 수정 API:
- 회원탈퇴, 사용중지, 약관동의 관리
- AccountService, AccountController, Swagger

5.4 매출 거래명세서 API:
- 거래명세서 조회/발행/이메일발송
- SaleService 확장, Swagger 문서화
2025-12-19 14:52:53 +09:00
10a64fb0a5 feat: FCM 실서비스 확장 - 대량 발송 및 무효 토큰 관리
- FcmSender.sendToMany() 추가 (chunk/rate limit 지원)
- FcmBatchResult 클래스 추가 (발송 결과 집계)
- fcm:send 명령어 추가 (대량 발송, dry-run 지원)
- fcm:prune-invalid 명령어 추가 (무효 토큰 정리)
- PushDeviceToken에 last_error, last_error_at 컬럼 추가
- 실패 토큰 자동 비활성화 (UNREGISTERED, NOT_FOUND, INVALID_ARGUMENT)
2025-12-18 23:01:06 +09:00