Commit Graph

200 Commits

Author SHA1 Message Date
3e31c8da22 fix: Items API 유연성 개선 - Flow Tester 호환성
- GET /api/v1/items/bom 엔드포인트 추가 (BOM 있는 전체 품목 목록)
- ItemService::index() item_type/group_id 없으면 group_id=1 기본값 적용
- ItemService::showByCode() item_type 없으면 items 테이블에서 직접 검색
- ItemsBomController::listAll() 메서드 추가

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-21 16:06:13 +09:00
756d08be09 fix: clients 테이블 ENUM→VARCHAR 정규화 및 common_codes 연동
- 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>
2025-12-21 16:05:54 +09:00
1449683aae refactor: Controller에서 Swagger 어노테이션 분리
- EstimateController에서 Swagger 어노테이션 제거 → EstimateApi.php 생성
- CommonController에서 Swagger 어노테이션 제거 → CommonApi.php 업데이트
- TenantFieldSettingController에서 Swagger 어노테이션 제거 → TenantFieldSettingApi.php 생성
- Swagger 정책 준수: Controller는 비즈니스 로직만, Swagger는 별도 파일로 분리

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-21 04:12:57 +09:00
65c5de2db1 feat(api): Items API 멀티 item_type 지원 및 파라미터 일관성 개선
- ItemService: 콤마 구분 멀티 item_type 지원 (예: type=FG,PT)
  - parseItemTypes(): 콤마 구분 문자열을 배열로 파싱
  - validateItemTypesInSameGroup(): 같은 group_id 검증
  - index(), search() 메서드에 멀티 타입 로직 적용

- ItemsController: type/item_type 파라미터 일관성
  - show(), showByCode(), destroy() 메서드에서 type 파라미터 지원
  - 모든 엔드포인트에서 type 또는 item_type 둘 다 허용

- ItemBatchDeleteRequest: prepareForValidation()으로 type→item_type 매핑

- i18n: item_types_must_be_same_group 에러 메시지 추가 (ko/en)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 01:10:38 +09:00
496aec04f5 refactor: 하드코딩된 validation을 common_codes 기반으로 변경
- item_type_code: 기존 PRODUCT,MATERIAL 고정값 → common_codes 조회
- margin_rate: max:100 제한 제거 (100% 초과 마진 허용)
- client_type: 매입/매출/매입매출 common_codes로 이동
- bad_debt_progress: 협의중/소송중/회수완료/대손처리 common_codes로 이동
- product_category: 스크린/스틸 common_codes로 이동
- 마이그레이션 추가: client_type, bad_debt_progress, product_category 코드 그룹

수정 파일:
- PriceStoreRequest, PriceUpdateRequest
- ClientStoreRequest, ClientUpdateRequest
- QuoteStoreRequest, QuoteUpdateRequest

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 22:28:38 +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
993b347fb7 feat: 로그인 시 아이디 또는 이메일로 인증 가능하도록 개선
- 입력값이 이메일 형식이면 email 컬럼으로 조회
- 아이디 형식이면 user_id 컬럼으로 조회
- filter_var(FILTER_VALIDATE_EMAIL) 사용

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 12:46:30 +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
c15a245166 feat: Phase 7.2 보완 - 나의 게시글 API 추가
- PostService.getMyPosts() 메서드 추가
- PostController.myPosts() 액션 추가
- GET /v1/posts/my 라우트 추가
- PostApi.php Swagger 문서 추가
2025-12-19 16:27:36 +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
da7165a79f fix: ApiResponse import 경로 수정
- App\Utils\ApiResponse → App\Helpers\ApiResponse
- 클래스 경로 불일치로 500 에러 발생하던 문제 해결
2025-12-18 21:15:57 +09:00
45780ea351 feat: 구독/결제 API 확장 (Plan, Subscription, Payment)
- 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 코드 스타일 정리
2025-12-18 16:20:29 +09:00
7278c4742f fix: ApiResponse 4xx 에러에서 스택 트레이스 제외 및 Controller 메서드 수정
- 4xx 클라이언트 에러에는 스택 트레이스 제외
- 5xx 서버 에러에만 debug 모드에서 스택 트레이스 포함
- 10개 Controller의 ApiResponse::handle() → success() 수정
  - BankAccountController, SiteController, CardController
  - DepositController, WithdrawalController, SaleController
  - PurchaseController, PayrollController, ReportController
  - WorkSettingController
- import 경로 수정 (App\Http\Responses → App\Helpers)
2025-12-18 15:42:46 +09:00
8ad4d7c0ce feat: Phase 3.8 바로빌 세금계산서 연동 API 구현
- 마이그레이션: barobill_settings, tax_invoices 테이블 생성
- 모델: BarobillSetting (인증서 암호화), TaxInvoice (상태/유형 상수)
- 서비스: BarobillService (API 연동), TaxInvoiceService (CRUD, 발행/취소)
- 컨트롤러: BarobillSettingController, TaxInvoiceController
- FormRequest: 6개 요청 검증 클래스
- Swagger: API 문서 완성 (BarobillSettingApi, TaxInvoiceApi)
2025-12-18 15:31:59 +09:00
af833194ea feat: 가지급금 관리 API 구현
- loans 테이블 마이그레이션 추가
- Loan 모델 (인정이자 계산, 세금 계산 로직)
- LoanService (CRUD, 정산, 인정이자 계산/리포트)
- LoanController, FormRequest 5개
- 9개 API 라우트 등록
- i18n 키 추가 (validation)
2025-12-18 14:27:10 +09:00
8b30a555d2 feat: MNG→API 토큰 교환 엔드포인트 추가
- POST /api/v1/internal/exchange-token 추가
- HMAC-SHA256 서명 기반 서버간 인증
- InternalTokenService: 서명 검증 및 Sanctum 토큰 발급
- ExchangeTokenRequest: 요청 검증 (user_id, tenant_id, exp, signature)
- ApiKeyMiddleware: 내부 통신 경로 화이트리스트 추가
- i18n 메시지 추가 (error.internal.*, message.internal.*)

환경변수 필요: INTERNAL_EXCHANGE_SECRET (MNG와 동일)
2025-12-18 14:21:37 +09:00
98645316fc feat: AI 리포트 API 구현 (Google Gemini 연동)
- ai_reports 테이블 마이그레이션 추가
- AiReport 모델 생성 (daily/weekly/monthly 유형)
- AiReportService 구현 (비즈니스 데이터 수집 + Gemini API)
- 4개 API 엔드포인트 추가 (목록/생성/상세/삭제)
- Swagger 문서 및 i18n 메시지 추가
2025-12-18 13:51:40 +09:00
c7eee97610 style: Pint 코드 스타일 자동 수정 및 마이그레이션 실행
- Pint 스타일 이슈 25개 수정 (783 파일 통과)
- 마이그레이션 4개 실행 (payrolls, payroll_settings, push 테이블)
- routes/api.php import 정렬
2025-12-18 11:40:49 +09:00
76d86cfa9f feat: Dashboard API 구현
- DashboardService: summary(), charts(), approvals() 메서드 구현
- DashboardController: 3개 엔드포인트 (summary, charts, approvals)
- FormRequest: DashboardChartsRequest, DashboardApprovalsRequest
- Swagger: DashboardApi.php 문서 작성
- i18n: dashboard 관련 메시지 키 추가
- 라우트: /api/v1/dashboard/* 엔드포인트 등록

Phase 2 대시보드(3.3) 완료
2025-12-18 11:23:35 +09:00
6477cf2c83 feat: 대시보드 API 및 FCM 푸시 알림 API 구현
Dashboard API:
- DashboardController, DashboardService 추가
- /dashboard/summary, /charts, /approvals 엔드포인트

Push Notification API:
- FCM 토큰 관리 (등록/해제/목록)
- 알림 설정 관리 (유형별 on/off, 알림음 설정)
- 알림 유형: deposit, withdrawal, order, approval, attendance, notice, system
- 알림음: default, deposit, withdrawal, order, approval, urgent
- PushDeviceToken, PushNotificationSetting 모델
- Swagger 문서 추가
2025-12-18 11:16:24 +09:00
7089dd1e46 feat: 급여 관리 API 구현 (Phase 2: 3.2)
- 마이그레이션: payrolls, payroll_settings 테이블 생성
- 모델: Payroll (상태관리 draft→confirmed→paid), PayrollSetting
- 서비스: PayrollService (4대보험 계산, 급여명세서)
- 컨트롤러: PayrollController + FormRequest 5개
- API 엔드포인트 13개:
  - 급여 CRUD + confirm/pay/payslip
  - 일괄 계산/확정 (calculate, bulk-confirm)
  - 설정 관리 (settings/payroll)
- Swagger 문서: PayrollApi.php
- i18n: error.php, message.php, validation.php 키 추가
2025-12-18 10:56:16 +09:00
b43796a558 feat: [approval] 전자결재 모듈 API 구현
- 마이그레이션 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개 등록
2025-12-17 23:23:20 +09:00
77914da7b7 feat: 보고서(Reports) API 구현
- 일일 일보 조회/엑셀 다운로드 API 추가
- 지출 예상 내역서 조회/엑셀 다운로드 API 추가
- ReportService: 전일/당일 잔액 계산, 월별 지출 예상 집계
- Laravel Excel을 이용한 엑셀 내보내기 구현
- Swagger 문서 작성 완료
2025-12-17 22:51:17 +09:00
cbed92a95c feat: 매출/매입 관리 API 구현
- 매출(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
2025-12-17 22:14:48 +09:00
17799c47de feat: 2.4 입금/출금 관리 API 구현
- 마이그레이션: deposits, withdrawals 테이블 생성
- 모델: Deposit, Withdrawal (BelongsToTenant, SoftDeletes)
- 서비스: DepositService, WithdrawalService (CRUD + summary)
- 컨트롤러: DepositController, WithdrawalController
- FormRequest: Store/Update 검증 클래스
- Swagger: 입금/출금 API 문서 (12개 엔드포인트)
- 라우트: /v1/deposits, /v1/withdrawals 등록
2025-12-17 21:47:15 +09:00
e1b0c99d5d feat: 2.3 카드/계좌 관리 API 구현
- cards, bank_accounts 테이블 마이그레이션
- Card, BankAccount 모델 (카드번호 암호화)
- CardService, BankAccountService
- CardController, BankAccountController + FormRequest 4개
- API 엔드포인트 15개 (카드 7개, 계좌 8개)
- Swagger 문서 (CardApi.php, BankAccountApi.php)
2025-12-17 21:02:20 +09:00
ca5618be98 feat: 근무/출퇴근 설정 및 현장 관리 API 구현
- 근무 설정 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 메시지 키 추가
2025-12-17 20:46:37 +09:00
e81e5d7084 feat: 휴가 관리 API 구현 (Phase 1)
- leaves, leave_balances 테이블 마이그레이션 추가
- Leave, LeaveBalance 모델 구현 (BelongsToTenant, SoftDeletes)
- LeaveService 서비스 구현 (CRUD, 승인/반려/취소, 잔여일수 관리)
- LeaveController 및 FormRequest 5개 생성
- API 엔드포인트 11개 등록 (/v1/leaves/*)
- Swagger 문서 (LeaveApi.php) 작성
- i18n 메시지 키 추가 (message.leave.*, error.leave.*)
2025-12-17 20:13:48 +09:00
2442fd1d15 API 로그 미들웨어 개선: 그룹 ID 생성 로직 2025-12-15 22:11:22 +09:00
f262b0a665 fix: 파일 교체 시 기존 파일 완전 삭제 (soft delete → permanent delete) 2025-12-15 20:37:24 +09:00
2862015605 feat: Items show() API 개선 - files 로딩 및 item_type 선택적 처리
- Item 모델 files() 관계를 document_id/document_type 기반으로 변경
- show() 메서드에 files 로딩 및 field_key별 그룹화 추가
- item_type 파라미터 선택적 처리 (ID만으로 조회 가능)
- showWithPrice() 메서드 반환 타입 변경에 맞게 수정
2025-12-15 19:27:36 +09:00
c36f909728 API 로그에 사용자/테넌트 정보 및 그룹핑 기능 추가
- LogApiRequest 미들웨어에서 app('api_user'), app('tenant_id') 사용
- 5초 TTL 캐시 기반 group_id 생성으로 연관 API 호출 그룹핑
- group_id 컬럼 추가 마이그레이션
2025-12-15 16:33:51 +09:00
ba528b5a13 feat: API 요청/응답 로깅 시스템 추가
- api_request_logs 테이블 생성 (하루치만 보관)
- LogApiRequest 미들웨어로 DB + 로그 파일 이중 저장
- 날짜별 로그 파일: storage/logs/api/api-YYYY-MM-DD.log
- 민감 데이터 자동 마스킹 (password, token 등)
- api-log:prune 스케줄러로 매일 03:00 자동 정리
2025-12-15 15:16:38 +09:00
b1bcad3be6 feat: Items API에 group_id 파라미터 지원 추가
- 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)
2025-12-15 14:47:04 +09:00
aaf7979d5f fix: ItemsFileController 파일 API 오류 수정
- delete() 메서드  타입을 mixed로 변경 + 내부 캐스팅
- userId null 처리 (auth()->id() ?? app('api_user'))
- deleteFile() private 메서드로 삭제 로직 일원화
- getFileUrl()을 file_id 기반으로 변경 (/api/v1/files/{id}/download)
- LOGICAL_RELATIONSHIPS.md items 통합 반영
2025-12-15 13:56:12 +09:00
20ad6da164 fix: P0 Critical 이슈 수정 - 삭제된 Product/Material 참조 제거
- ItemsBomController: ProductBomService 제거, Item.bom JSON 기반으로 재구현
- ItemsFileController: Product/Material → Item 모델로 통합
- ItemPage: products/materials 클래스 매핑 제거
- ItemsService 삭제 (1,210줄) - ItemService로 대체 완료

BOM 기능 변경:
- 기존: ProductBomService (삭제됨)
- 변경: Item 모델의 bom JSON 필드 직접 조작
- 모든 BOM API 엔드포인트 정상 동작

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-14 01:10:25 +09:00
039fd623df refactor: products/materials 테이블 및 관련 코드 삭제
- products, materials, product_components 테이블 삭제 마이그레이션
- FK 제약조건 정리 (orders, order_items, material_receipts, lots)
- 관련 Models 삭제: Product, Material, ProductComponent 등
- 관련 Controllers 삭제: ProductController, MaterialController, ProductBomItemController
- 관련 Services 삭제: ProductService, MaterialService, ProductBomService
- 관련 Requests, Swagger 파일 삭제
- 라우트 정리: /products, /materials 엔드포인트 제거

모든 품목 관리는 /items 엔드포인트로 통합됨
item_id_mappings 테이블에 ID 매핑 보존

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-14 00:20:09 +09:00
d1afa6e05e feat: ItemService 동적 테이블 라우팅 구현
- item_type → ItemPage.source_table → Model 클래스 동적 라우팅
- getModelInfoByItemType(): item_type으로 Model 정보 조회 (캐싱)
- newQuery(): 동적 Query Builder 생성
- 모든 CRUD 메서드 item_type 필수 파라미터로 변경
- ItemsController item_type 전달 로직 수정
- 에러 메시지 추가 (item_type_required, invalid_source_table)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-13 23:28:06 +09:00
aa9746ae2f feat: files 테이블 field_key 컬럼 추가 및 file_type VARCHAR 변경
- file_type: ENUM → VARCHAR(50) 변경 (확장성 개선)
- field_key: VARCHAR(100) 신규 컬럼 (비즈니스 용도 구분)
- ItemsFileController: field_key 사용, file_type 자동 분류 (detectFileType)
- File 모델: fillable에 field_key 추가
- ItemsService: getItemFiles()에서 field_key로 그룹핑
- rollback_items_migration: FK 제약조건 처리 수정
2025-12-12 18:29:14 +09:00
2e4d4d3be3 feat: Items Files API 개선 - group_id 기반, 동적 field_key 지원
- GET /items/{id}/files 엔드포인트 추가 (파일 목록 조회)
- document_type을 group_id('1')로 변경 (테이블명 대신 코드 기반)
- field_key 제한 해제 (자유롭게 지정 가능)
- 품목 상세 조회 시 files 필드 포함 (field_key별 그룹핑)
- ItemFileUploadRequest FormRequest 추가
- DELETE 라우트 파라미터를 {fileId}로 변경
2025-12-12 17:38:22 +09:00
cc3feb1927 feat: 품목 파일 업로드를 files 테이블 기반으로 변경
- ItemsFileController: files 테이블에 메타데이터 저장, products는 file_id 참조
- 저장 경로: storage/app/tenants/{tenant_id}/items/{year}/{month}/{stored_name}
- 파일명: 64bit 난수로 보안 강화 (bin2hex(random_bytes(8)))
- Swagger 문서: file_id 반환 및 저장 구조 설명 추가
- file-storage-guide.md 규격 준수
2025-12-11 22:40:55 +09:00
d5ab522902 feat: Items API is_active 필터/반환 및 동적 필드 지원
- 목록 조회에 is_active 필드 반환 및 필터 파라미터 추가
- 상세 조회에서 options 동적 필드 플랫 전개
- 생성/수정 시 동적 필드 options 저장 지원
2025-12-11 09:56:01 +09:00
b086518075 feat: Material/Product 동적 필드 options 저장 및 자재 삭제 보호
- products 테이블에 options JSON 컬럼 추가 (마이그레이션)
- Material/Product 모델에 options 필드 추가 (fillable, casts)
- SystemFields::PRODUCTS에 options 상수 추가
- MaterialService/ProductService에 동적 필드 자동 추출 로직:
  - getKnownFields(): SystemFields + ItemField 기반 고정 필드 조회
  - extractDynamicOptions(): 동적 필드 추출
  - normalizeOptions(): [{label, value, unit}] 형태로 정규화
- material_code 중복 체크 시 soft delete 포함 (withTrashed)
- 사용 중인 자재 삭제 방지 (checkMaterialUsage)
- Material 모델에 category 관계 추가
2025-12-10 21:37:20 +09:00
cde89b2fb3 feat: Items API item_type 기반 통합 조회/삭제 개선
- ItemTypeHelper를 활용한 item_type(FG/PT/SM/RM/CS) → source_table 매핑
- getItem: item_type 파라미터로 products/materials 테이블 자동 결정
- deleteItem: item_type 필수 파라미터 추가
- batchDeleteItems: item_type별 일괄 삭제 지원
- 목록 조회 시 attributes 플랫 전개
- Swagger 문서 업데이트
2025-12-09 21:51:46 +09:00
f1f4c52c31 feat: 근태관리/직원관리 API 구현
- AttendanceController, AttendanceService 추가
- EmployeeController, EmployeeService 추가
- Attendance 모델 및 마이그레이션 추가
- TenantUserProfile에 employee_status 컬럼 추가
- DepartmentService 트리 조회 기능 개선
- Swagger 문서 추가 (AttendanceApi, EmployeeApi)
- API 라우트 등록
2025-12-09 20:27:44 +09:00
5f200054ea feat: clients.is_active CHAR(1) → TINYINT(1) Boolean 마이그레이션
- DB: CHAR(1) 'Y'/'N' → TINYINT(1) 0/1 컬럼 타입 변경
- Model: boolean 캐스트 추가, scopeActive() 수정
- Service: toggle(), index() Boolean 로직 적용
- FormRequest: 'in:Y,N' → 'boolean' 검증 규칙 변경
- Swagger: is_active type string → boolean 변경
2025-12-08 20:25:38 +09:00
8d3ea4bb39 feat: 단가 관리 API 구현 및 Flow Tester 호환성 개선
- Price, PriceRevision 모델 추가 (PriceHistory 대체)
- PricingService: CRUD, 원가 조회, 확정 기능
- PricingController: statusCode 파라미터로 201 반환 지원
- NotFoundHttpException(404) 적용 (존재하지 않는 리소스)
- FormRequest 분리 (Store, Update, Index, Cost, ByItems)
- Swagger 문서 업데이트
- ApiResponse::handle()에 statusCode 옵션 추가
- prices/price_revisions 마이그레이션 및 데이터 이관
2025-12-08 19:03:50 +09:00
5131bfff98 feat: item_fields 테이블에 is_active 컬럼 추가
- 마이그레이션: is_active 컬럼 추가 (기본값 true)
- ItemField 모델: fillable, casts에 is_active 추가
- ItemFieldService: store, storeIndependent, clone, update 메서드에 is_active 처리
- FormRequest: is_active 유효성 검사 규칙 추가
- API Flow 테스트 시나리오 추가 (docs/api-flows/)
- docs/INDEX.md에 api-flows 섹션 추가

ModelTrait::scopeActive() 메서드 사용을 위한 필수 컬럼
2025-12-05 14:40:09 +09:00