3.6 KiB
3.6 KiB
Data Model: Inventory Coverage Interactive Table
Overview
This feature does not introduce persistent storage. It defines runtime view-model objects that shape existing coverage metadata into a Filament table.
Entities
CoverageTableRow
- Purpose: Represents one row in the interactive coverage table.
- Source: Derived from
InventoryPolicyTypeMeta::supported()andInventoryPolicyTypeMeta::foundations()plusCoverageCapabilitiesResolver.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
key |
string | yes | Stable runtime identifier composed from segment and type for table keys and deterministic ordering |
segment |
enum(policy,foundation) |
yes | Distinguishes supported policy types from foundation types |
type |
string | yes | Stable policy type identifier |
label |
string | yes | Human-readable label derived from shared badge metadata |
category |
string | yes | Coverage category from the metadata catalog |
dependencies |
bool | yes | Whether dependency support is available for the type |
restore |
string nullable | no | Restore mode value when present in the current data shape |
risk |
string | yes | Risk state from the existing metadata source |
source_order |
int | yes | Preserves deterministic fallback ordering from the source lists |
Validation Rules
keymust be non-empty and unique within the dataset.segmentmust be one ofpolicyorfoundation.typemust be non-empty.categoryandriskmust match values already emitted by the metadata source.restoremay be null; if present, it must match a restore-mode value supported by the shared badge catalog.
CoverageTableDataset
- Purpose: Aggregates the derived rows and the filter metadata required by the table.
Fields
| Field | Type | Required | Description |
|---|---|---|---|
rows |
list | yes | Full runtime dataset rendered by the table |
categories |
list | yes | Distinct category options available for filtering |
restore_modes |
list | no | Distinct restore values available for filtering; empty when restore metadata is absent |
Relationships
- One
CoverageTableDatasetcontains manyCoverageTableRowobjects. - Badge rendering for each
CoverageTableRowis derived from shared badge catalogs, not embedded or persisted.
CoverageTableState
- Purpose: Represents the transient UI state managed by Filament table interactions.
Fields
| Field | Type | Description |
|---|---|---|
search |
string nullable | Current free-text search term |
category_filter |
string nullable | Selected category filter |
restore_filter |
string nullable | Selected restore filter when available |
sort_column |
string nullable | Current sort column |
sort_direction |
enum(asc,desc) nullable |
Current sort direction |
page |
int | Current pagination page |
State Transitions
- Initial load: Build
CoverageTableDatasetfrom existing metadata sources and render default sort order. - Search update: Narrow
rowsby matchingtypeandlabel. - Category filter update: Narrow
rowsto selected category. - Restore filter update: Narrow
rowsto selected restore mode when that filter exists. - Reset action: Clear search and filters and return to the default dataset view.
Notes
- No database migrations, model classes, or storage contracts change in this feature.
- The runtime row model exists only to shape existing metadata for a native Filament table experience.