Commit Graph

4 Commits

Author SHA1 Message Date
de3b009a2b feat(CUB-7): Add XML doc comments to FilamentValidators constructors 2026-04-27 21:10:24 -04:00
6d2634aa6c feat(CUB-28): [Extrudex] Define filament inventory database entities
Add storage_location and is_archived fields to Spool entity to complete
the filament inventory entity definition per CUB-28 requirements.

Changes:
- Spool entity: add IsArchived (bool, default false) and StorageLocation
  (nullable string, max 200) for physical inventory tracking
- SpoolConfiguration: add snake_case column mappings, defaults, and indexes
  (ix_spools_is_archived, ix_spools_active_archived composite)
- FilamentDtos: add IsArchived + StorageLocation to Response, Create, Update
- FilamentQueryDtos: add IncludeArchived and StorageLocation query filters
- FilamentsController: wire new fields into query, create, update, mapping
- FilamentValidators: add StorageLocation max-length validation

Build: PASS (0 errors)
2026-04-27 21:10:24 -04:00
cubecraft-agents[bot]
9cd27e213b CUB-30: Implement PUT /filaments/{id} update endpoint
- Add FluentValidation validators for CreateFilamentRequest and UpdateFilamentRequest
  with comprehensive validation rules (required fields, string lengths, hex color format,
  weight constraints including WeightRemainingGrams <= WeightTotalGrams, purchase price range)
- Add FluentValidationFilter action filter that auto-runs FluentValidation validators
  for all API controller actions before execution, returning 400 with structured error details
- Register FluentValidationFilter in DI and add it to MVC controller filters in Program.cs
- PUT endpoint was already implemented in FilamentsController with proper validation,
  404 handling, FK existence checks, serial uniqueness check, and weight constraint check
- This change ensures FluentValidation rules are enforced consistently via the pipeline
2026-04-26 13:26:26 +00:00
cubecraft-agents[bot]
230c3b295d initial commit 2026-04-25 18:51:05 +00:00