- SubscriptionService::usage()에 api_calls 섹션 추가
- api_request_logs 테이블에서 테넌트별 일간 API 호출 수 집계
- 기본 일간 제한: 10,000회
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
- 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>
- ProcessController: 공정 관리 API 개선
- routes/api.php: API 라우팅 정리
- CURRENT_WORKS.md: 작업 현황 업데이트
- LOGICAL_RELATIONSHIPS.md: 논리적 관계 문서화
- profile-image-upload-api.md: 프로필 이미지 업로드 API 메모
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
- 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>
- updateMe() 메서드에서 profile_photo_path, display_name 고정 필드를
effectiveFieldMap() 동적 필드 처리 전에 직접 저장하도록 수정
- 기존 로직은 SettingFieldDef 테이블 기반 동적 필드만 처리하여
profile_photo_path가 무시되던 문제 해결
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
## 변경 사항
### 검사 시스템 통합
- 레거시 검사 모델 삭제 (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>
- GET /api/v1/menus에서 is_active 파라미터 없으면 기본값 1(활성)로 설정
- 비활성 메뉴 조회는 is_active=0 명시적으로 전달 필요
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- ApprovalTestDataSeeder: 테넌트 ID 동적 처리 (DummyDataSeeder.TENANT_ID)
- DummyDataSeeder: 결재 시더 호출 추가
- 결재 양식 3건, 결재 문서 20건, 결재선 ~40건 생성
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- DummySaleSeeder: 클라이언트 이름 매칭 실패 시 기존 클라이언트 랜덤 선택
- DummyPurchaseSeeder: 동일한 fallback 로직 추가
- 거래처 없을 경우 조기 반환 처리
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
- MenuService에 게시판 메뉴 연동 메서드 추가
- createMenuForBoard(): 게시판 생성 시 /board 하위에 메뉴 자동 추가
- updateMenuForBoard(): 코드/이름 변경 시 메뉴 URL/이름 동기화
- deleteMenuForBoard(): 게시판 삭제 시 메뉴 Soft Delete
- restoreMenuForBoard(): 게시판 복원 시 메뉴 복원
- findParentMenuForBoard(): 부모 메뉴 (/board) 찾기
- BoardService에서 테넌트 게시판 CRUD 시 MenuService 호출
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
- shared/actions.ts: /boards/ → /system-boards/ 엔드포인트 변경
- EventList, InquiryList, NoticeList: 날짜 범위 초기값 빈 문자열로 변경 (전체 조회)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 시스템 게시판도 tenant_id 항상 설정 (본사=1 글만 전체 공개)
- applySystemBoardScope() 헬퍼 추가로 쿼리 조건 통일
- saveCustomFields()에 field_key → field_id 매핑 로직 추가
- createComment()에 tenant_id 추가 (NOT NULL 제약조건 충족)
- 시스템 게시판 조회 조건: (tenant_id = 1) OR (tenant_id = 현재테넌트)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
문제:
- 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>
- SystemBoardController: 시스템 게시판 목록/상세/필드 조회
- SystemPostController: 시스템 게시글 CRUD + 댓글 CRUD
- BoardService: getSystemBoardByCode(), getTenantBoardByCode() 추가
- PostService: 시스템/테넌트 게시판 전용 메서드 추가
- routes/api.php: /system-boards/* 엔드포인트 12개 추가
- SystemBoardApi.php: Swagger 문서
시스템 게시판 (is_system=true, tenant_id=null)과
테넌트 게시판 (is_system=false, tenant_id={current})의
board_code 중복 가능성으로 인해 별도 엔드포인트로 분리
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
- BoardController: show 메서드 ID 기반 조회로 변경
- BoardStoreRequest: extra_settings.target/target_id/target_name 검증 추가
- BoardUpdateRequest: extra_settings.target/target_id/target_name 검증 추가
- routes/api.php: 게시판 상세 라우트 {code} → {id} 변경
테넌트 게시판 정책:
- 테넌트는 자신의 게시판만 CRUD 가능
- 시스템 게시판은 mng에서만 관리
- board_code는 시스템/테넌트 간 중복 허용
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 마이그레이션: 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>
- getAllBalances()에서 employee_status 필터를 'active'에서
['active', 'leave']로 변경하여 휴직 직원도 포함
- 휴직 상태 직원: 최준호(46), 한지민(50), 오태양(51)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
- 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>
- ComprehensiveAnalysisController: 종합분석 조회 API
- ComprehensiveAnalysisService: 분석 데이터 집계 로직
- Swagger 문서화
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- BankTransactionController: 은행 거래내역 조회 API
- BankTransactionService: 은행 거래 조회 로직
- Swagger 문서화
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
- VendorLedgerController: 거래처별 원장 조회 API
- VendorLedgerService: 원장 조회 비즈니스 로직
- Swagger 문서화
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 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>
- 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>
- 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>
- 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>
- 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>
- store() 메서드에서 item_type으로 common_codes.attributes의 source_table 조회
- getSourceTableFromCommonCode() 헬퍼 메서드 추가
- 기존 source_table이 null인 레코드 수정 (tenant_id=288의 CS, RM)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
## 모델 개선
- 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>
- store() 수정: create_account=false면 password=NULL 허용 (사원 전용)
- revokeAccount() 추가: 시스템 계정 해제 (password=NULL, 토큰 무효화)
- POST /employees/{id}/revoke-account 라우트 추가
- ko/employee.php, en/employee.php 언어 파일 생성
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>