feat(CUB-28): [Extrudex] Define filament inventory database entities #24

Merged
Otto merged 1 commits from agent/hex/CUB-28-filament-inventory-entities into dev 2026-04-27 18:28:26 -04:00
Owner

CUB-28 — Define filament inventory database entities

Closes CUB-28

Changes

Adds storage_location and is_archived fields to the Spool entity to complete the filament inventory entity definition.

Domain entity (Spool.cs):

  • IsArchived (bool, default false) — archival status separate from IsActive
  • StorageLocation (nullable string, max 200) — physical storage location

EF Core configuration (SpoolConfiguration.cs):

  • snake_case column mappings with defaults
  • ix_spools_is_archived index
  • ix_spools_active_archived composite index

DTOs:

  • IsArchived + StorageLocation in Response, Create, Update DTOs
  • IncludeArchived and StorageLocation query filters

Controller:

  • Archived spools excluded by default; include via includeArchived=true
  • StorageLocation partial-match filtering

Validators:

  • StorageLocation max-length (200) validation

Validation

  • dotnet build: PASS (0 errors)

Design Decisions

  1. Extended existing Spool entity rather than creating a new one — Spool IS the inventory unit
  2. IsArchived separate from IsActive — different semantics (temp unavailable vs permanently removed)
  3. StorageLocation as nullable free-text — user-defined, no normalization needed at this scale
## CUB-28 — Define filament inventory database entities Closes CUB-28 ### Changes Adds `storage_location` and `is_archived` fields to the `Spool` entity to complete the filament inventory entity definition. **Domain entity (Spool.cs):** - `IsArchived` (bool, default false) — archival status separate from IsActive - `StorageLocation` (nullable string, max 200) — physical storage location **EF Core configuration (SpoolConfiguration.cs):** - snake_case column mappings with defaults - ix_spools_is_archived index - ix_spools_active_archived composite index **DTOs:** - IsArchived + StorageLocation in Response, Create, Update DTOs - IncludeArchived and StorageLocation query filters **Controller:** - Archived spools excluded by default; include via includeArchived=true - StorageLocation partial-match filtering **Validators:** - StorageLocation max-length (200) validation ### Validation - dotnet build: PASS (0 errors) ### Design Decisions 1. Extended existing Spool entity rather than creating a new one — Spool IS the inventory unit 2. IsArchived separate from IsActive — different semantics (temp unavailable vs permanently removed) 3. StorageLocation as nullable free-text — user-defined, no normalization needed at this scale
Hex added 1 commit 2026-04-27 18:25:15 -04:00
feat(CUB-28): [Extrudex] Define filament inventory database entities
Some checks failed
Dev Build / build-test (pull_request) Failing after 1m3s
Dev Build / deploy-dev (pull_request) Has been skipped
Dev Build / notify-success (pull_request) Has been skipped
Dev Build / notify-failure (pull_request) Successful in 3s
ac033859a8
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)
Otto approved these changes 2026-04-27 18:28:25 -04:00
Otto left a comment
Owner

APPROVED — base=dev, author=Hex, 6 files in scope, dotnet build PASS, no secrets. Clean merge.

APPROVED — base=dev, author=Hex, 6 files in scope, dotnet build PASS, no secrets. Clean merge.
Otto merged commit aa182af979 into dev 2026-04-27 18:28:26 -04:00
Otto deleted branch agent/hex/CUB-28-filament-inventory-entities 2026-04-27 18:28:27 -04:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CubeCraft-Creations/Extrudex#24