15 Commits

Author SHA1 Message Date
189b38c936 feat: Auditable 트레이트 구현 및 97개 모델 적용
- Auditable 트레이트 신규 생성 (bootAuditable 패턴)
  - creating: created_by/updated_by 자동 채우기
  - updating: updated_by 자동 채우기
  - deleting: deleted_by 채우기 + saveQuietly()
  - created/updated/deleted: audit_logs 자동 기록
- 기존 AuditLogger 패턴과 동일한 try/catch 조용한 실패
- 변경된 필드만 before/after 기록 (updated 이벤트)
- auditExclude 프로퍼티로 모델별 제외 필드 설정 가능
- 제외 대상: Attendance, StockTransaction, TodayIssue 등 고빈도/시스템 모델

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 15:33:54 +09:00
pro
da45e1433b fix:수정 2026-01-20 20:51:42 +09:00
pro
0ae3c5aa07 feat: 계좌관리 추가 2026-01-20 20:43:38 +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
4f3b218441 feat: Phase 5 - 참조 테이블 모델 item_id 마이그레이션
- Order 모델: product_id 제거, item_id 추가, item() 관계 추가
- OrderItem 모델: product_id 제거, item_id 추가, item() 관계 추가
- Quote 모델: product_id 제거, item_id 추가, item() 관계 추가
- MaterialReceipt 모델: material_id 제거, item_id 추가, material() → item() 변경
- Lot 모델: Material import 제거, material() → item() 변경

DB 스키마는 이미 마이그레이션됨 (2025_12_13_153544)
기존 product_id/material_id 컬럼은 DB에 남아있지만 fillable에서 제거

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 01:23:05 +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
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
517d5940e9 feat: products 및 materials 테이블에 is_active 컬럼 추가
- is_active 컬럼 추가 마이그레이션 (default 1)
- Product 모델 fillable 및 casts 업데이트
- Material 모델 fillable 및 casts 업데이트
- Material 모델에 material_type fillable 추가
- ModelTrait의 scopeActive() 메서드 지원
2025-11-17 14:55:31 +09:00
cc206fdbed style: Laravel Pint 코드 포맷팅 적용
- PSR-12 스타일 가이드 준수
- 302개 파일 스타일 이슈 자동 수정
- 코드 로직 변경 없음 (포맷팅만)
2025-11-06 17:45:49 +09:00
d94ab59fd1 refactor: 모델 개선 및 관계 정의 수정
- Material 모델
  - fillable 속성 추가 (모든 필드 명시)

- User 모델
  - BelongsToMany 관계 타입 힌트 추가

- Product 모델
  - fillable에 unit 필드 추가
  - casts 순서 정리 (boolean 그룹화)

- ProductComponent 모델
  - quantity 캐스트 정밀도 변경 (decimal:4 → decimal:6)
  - referencedItem() 메서드 추가 (동적 관계 로드)
  - product(), material() 관계 메서드 수정 (where 조건 추가)
  - is_default 캐스트 제거 (컬럼 없음)

- Tenant 모델
  - options 캐스트 추가 (array)
  - scopeActive() 추가 (trial, active 상태 필터링)
  - isActive(), isTrial() 헬퍼 메서드 추가

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-30 14:35:26 +09:00
028af8fbfa fix : 모델 및 자재관리 수정 2025-09-02 10:08:51 +09:00
ed993476be fix : 자재관리 API (리스트,조회,등록,수정,삭제) 2025-08-21 22:28:34 +09:00
3707b53ffc fix : _ide_helper.php 헬퍼 추가
- 개발 보조 기능
2025-08-21 09:50:15 +09:00
24c85a0605 feat : Tag 모델 추가 2025-07-29 17:20:44 +09:00
1942f51cf7 fix : 모델 경로 수정 2025-07-29 13:00:25 +09:00