- 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 관계 추가
- is_active 컬럼 추가 마이그레이션 (default 1)
- Product 모델 fillable 및 casts 업데이트
- Material 모델 fillable 및 casts 업데이트
- Material 모델에 material_type fillable 추가
- ModelTrait의 scopeActive() 메서드 지원
- 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>