fix: reconstruct ProviderUsage subtypes on DB read and preserve StatusProviderUsage through pipeline
Follow-up fixes to PR #653 (ProviderUsage shape contract).
Changes
-
DB read path: The \card_type\ discriminator column was written on every INSERT but never read. All \QueryAsync\ calls materialised every row as \WindowedProviderUsage, silently dropping \ModelName\ and \StatusProviderUsage\ type identity. Added \HistoryRowDto\ + \ToTypedUsage\ switch that reconstructs the correct subtype.
-
Web mapper: \WebProviderUsageMapper.Map\ always created \QuotaProviderUsage. Now checks \card_type\ and creates \StatusProviderUsage\ when appropriate.
-
Processing pipeline: \NormalizeUsage\ was converting \StatusProviderUsage\ into \QuotaProviderUsage\ with zero quota values. Now preserves the \StatusProviderUsage\ type and only sets quota fields for \QuotaProviderUsage\ subtypes.