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:
@@ -10,7 +10,6 @@ export function toAdminListingDto(listing) {
|
||||
categoryId: listing.categoryId,
|
||||
conditionId: listing.conditionId,
|
||||
askingPriceMinor: listing.askingPriceMinor,
|
||||
imageCount: listing.imageCount,
|
||||
status: listing.status,
|
||||
notes: listing.notes ?? null,
|
||||
createdAt: toIsoString(listing.createdAt),
|
||||
|
||||
@@ -7,7 +7,6 @@ export const createListingSchema = z
|
||||
categoryId: z.uuid(),
|
||||
conditionId: z.uuid(),
|
||||
askingPriceMinor: z.int().positive(),
|
||||
imageCount: z.int().positive(),
|
||||
notes: z.string().trim().max(10000).optional(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
Reference in New Issue
Block a user