refactor: make inventory images the publication source

Remove the temporary listing-level image count from the schema, validation, DTO, and draft contract. Publication now requires the persisted inventory image repository count. Add migration 0009 and update listing tests and implementation status. Verification: npm test passed 62 tests and integration passed 14 tests. No build script is configured in this repository.
This commit is contained in:
2026-09-08 17:34:59 -04:00
parent c728016dec
commit 31f11f6d56
12 changed files with 28 additions and 35 deletions
@@ -97,7 +97,6 @@ test('persists a draft listing for a physical inventory item', async () => {
categoryId: category.id,
conditionId: condition.id,
askingPriceMinor: 2499,
imageCount: 2,
status: 'DRAFT',
notes: 'Near mint',
});
@@ -117,7 +116,6 @@ test('lists the most recent draft entries for an inventory item', async () => {
categoryId: category.id,
conditionId: condition.id,
askingPriceMinor: 2499,
imageCount: 2,
status: 'DRAFT',
});
@@ -167,7 +165,6 @@ test('reads and updates listings only through the owning seller scope', async ()
categoryId: category.id,
conditionId: condition.id,
askingPriceMinor: 2499,
imageCount: 2,
status: 'DRAFT',
});