- 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>
- 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>
- 급여 관리 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>
- 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 자동 갱신
- Purchase 모델에 tax_invoice_received 필드 추가
- PurchaseService에 toggleTaxInvoice() 메서드 추가
- UpdatePurchaseRequest에 tax_invoice_received 검증 규칙 추가
- 마이그레이션: purchases 테이블에 tax_invoice_received 컬럼 추가
- UpdateSaleRequest: tax_invoice_issued, transaction_statement_issued 필드 추가
- SaleService: 토글 필드 업데이트 로직 추가 (canEdit 우회)
- Sale 모델: fillable에 토글 필드 추가
- 마이그레이션: sales 테이블에 토글 컬럼 추가
- DummyDataSeeder 및 개별 시더 추가 (Client, BadDebt, Deposit 등)
- payments.paid_at nullable 마이그레이션
- subscriptions 취소 컬럼 추가
- clients 테이블 bad_debt 컬럼 제거
- PlanController, ClientService 수정
- 불필요한 claudedocs, flow-test 파일 정리
- 사용자 초대 API: role 문자열 지원 추가 (React 호환)
- 알림 설정 API: 그룹 기반 계층 구조 구현
- notification_setting_groups 테이블 추가
- notification_setting_group_items 테이블 추가
- notification_setting_group_states 테이블 추가
- GET/PUT /api/v1/settings/notifications 엔드포인트 추가
- Pint 코드 스타일 정리
- client_type, bad_debt_progress 컬럼을 ENUM에서 VARCHAR로 변경
- 기존 한글값을 common_codes의 code값으로 데이터 마이그레이션
- FormRequest에 prepareForValidation() 추가로 프론트 호환성 유지
- 한글 입력 시 자동으로 code 변환 (매입 → PURCHASE)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
- 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>
- 사용량 조회 API (GET /subscriptions/usage)
- 데이터 내보내기 API (POST/GET /subscriptions/export)
- 결제 명세서 API (GET /payments/{id}/statement)
- DataExport 모델 및 마이그레이션 추가
- FcmSender.sendToMany() 추가 (chunk/rate limit 지원)
- FcmBatchResult 클래스 추가 (발송 결과 집계)
- fcm:send 명령어 추가 (대량 발송, dry-run 지원)
- fcm:prune-invalid 명령어 추가 (무효 토큰 정리)
- PushDeviceToken에 last_error, last_error_at 컬럼 추가
- 실패 토큰 자동 비활성화 (UNREGISTERED, NOT_FOUND, INVALID_ARGUMENT)
- Plan/Subscription/Payment 모델에 상태 상수, 스코프, 헬퍼 메서드 추가
- PlanService, SubscriptionService, PaymentService 생성
- PlanController, SubscriptionController, PaymentController 생성
- FormRequest 9개 생성 (Plan 3개, Subscription 3개, Payment 3개)
- Swagger 문서 3개 생성 (PlanApi, SubscriptionApi, PaymentApi)
- API 라우트 22개 등록 (Plan 7개, Subscription 8개, Payment 7개)
- Pint 코드 스타일 정리
- loans 테이블 마이그레이션 추가
- Loan 모델 (인정이자 계산, 세금 계산 로직)
- LoanService (CRUD, 정산, 인정이자 계산/리포트)
- LoanController, FormRequest 5개
- 9개 API 라우트 등록
- i18n 키 추가 (validation)
- ai_reports 테이블 마이그레이션 추가
- AiReport 모델 생성 (daily/weekly/monthly 유형)
- AiReportService 구현 (비즈니스 데이터 수집 + Gemini API)
- 4개 API 엔드포인트 추가 (목록/생성/상세/삭제)
- Swagger 문서 및 i18n 메시지 추가
- 마이그레이션 4개 (approval_forms, approval_lines, approvals, approval_steps)
- 모델 4개 (ApprovalForm, ApprovalLine, Approval, ApprovalStep)
- ApprovalService 비즈니스 로직 (양식/결재선 CRUD, 기안함/결재함/참조함, 결재 액션)
- 컨트롤러 3개 (ApprovalFormController, ApprovalLineController, ApprovalController)
- FormRequest 13개 (양식/결재선/문서 검증)
- Swagger 문서 3개 (26개 엔드포인트)
- i18n 메시지/에러 키 추가
- 라우트 26개 등록
- 매출(Sale) 및 매입(Purchase) CRUD API 구현
- 문서번호 자동 생성 (SL/PU + YYYYMMDD + 시퀀스)
- 상태 관리 (draft → confirmed → invoiced)
- 확정(confirm) 및 요약(summary) 기능 추가
- BelongsToTenant, SoftDeletes 적용
- Swagger API 문서 작성 완료
추가된 파일:
- 마이그레이션: sales, purchases 테이블
- 모델: Sale, Purchase
- 서비스: SaleService, PurchaseService
- 컨트롤러: SaleController, PurchaseController
- FormRequest: Store/Update 4개
- Swagger: SaleApi.php, PurchaseApi.php
API 엔드포인트 (14개):
- GET/POST /v1/sales, /v1/purchases
- GET/PUT/DELETE /v1/{sales,purchases}/{id}
- POST /v1/{sales,purchases}/{id}/confirm
- GET /v1/{sales,purchases}/summary
- 근무 설정 API (GET/PUT /settings/work)
- 근무유형, 소정근로시간, 연장근로시간, 근무요일, 출퇴근시간, 휴게시간
- 출퇴근 설정 API (GET/PUT /settings/attendance)
- GPS 출퇴근, 허용 반경, 본사 위치 설정
- 현장 관리 API (CRUD /sites)
- 현장 등록/수정/삭제, 활성화된 현장 목록(셀렉트박스용)
- GPS 좌표 기반 위치 관리
마이그레이션: work_settings, attendance_settings, sites 테이블
모델: WorkSetting, AttendanceSetting, Site (BelongsToTenant, SoftDeletes)
서비스: WorkSettingService, SiteService
Swagger 문서 및 i18n 메시지 키 추가
- leaves, leave_balances 테이블 마이그레이션 추가
- Leave, LeaveBalance 모델 구현 (BelongsToTenant, SoftDeletes)
- LeaveService 서비스 구현 (CRUD, 승인/반려/취소, 잔여일수 관리)
- LeaveController 및 FormRequest 5개 생성
- API 엔드포인트 11개 등록 (/v1/leaves/*)
- Swagger 문서 (LeaveApi.php) 작성
- i18n 메시지 키 추가 (message.leave.*, error.leave.*)
- biz_cert 테이블 생성 (사업자등록번호, 상호, 대표자, 개업일, 주소, 업태, 종목, 발급일)
- raw_text, ocr_method 필드 추가 (OCR 원본 텍스트 및 처리 방식 저장)
- biz_no, company_name 인덱스 추가
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- api_request_logs 테이블 생성 (하루치만 보관)
- LogApiRequest 미들웨어로 DB + 로그 파일 이중 저장
- 날짜별 로그 파일: storage/logs/api/api-YYYY-MM-DD.log
- 민감 데이터 자동 마스킹 (password, token 등)
- api-log:prune 스케줄러로 매일 03:00 자동 정리
- common_codes에 item_group 추가 및 item_type parent_id 연결
- /api/v1/items?type=RM → 단일 품목 유형 조회
- /api/v1/items?group_id=103 → 그룹 전체 품목 조회 (FG,PT,SM,RM,CS)
- ItemService에 getItemTypesByGroupId(), newQueryForTypes() 메서드 추가
- 에러 메시지 추가 (item_type_or_group_required, invalid_group_id)
- BOM child_item_id를 새 items 테이블 ID로 마이그레이션
- Item.loadBomChildren() 수정: setRelation()으로 모델에 설정
- ItemService.validateBom() 추가: 순환 참조 방지
- error.php에 self_reference_bom 메시지 추가
- ID 7 자기참조 BOM 데이터 수정 완료
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- materials.material_code가 null인 경우 자동 코드 생성 (SM-000001 형식)
- item_id_mappings 테이블 중복 생성 방지 로직 추가
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
## 주요 변경사항
- Phase 0: 비표준 item_type 데이터 정규화 마이그레이션
- Phase 1.1: items 테이블 생성 (products + materials 통합)
- Phase 1.2: item_details 테이블 생성 (1:1 확장 필드)
- Phase 1.3: 데이터 이관 + item_id_mappings 테이블 생성
- Phase 3: item_pages.source_table 업데이트
- Phase 5: 참조 테이블 마이그레이션 (product_components, orders 등)
## 신규 파일
- app/Models/Items/Item.php - 통합 아이템 모델
- app/Models/Items/ItemDetail.php - 1:1 확장 필드 모델
- app/Services/ItemService.php - 통합 서비스 클래스
## 수정 파일
- ItemPage.php - items 테이블 지원 추가
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>