Files
fragginwagon 31f11f6d56 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.
2026-09-08 17:34:59 -04:00

13 lines
323 B
JavaScript

import { z } from 'zod';
export const createListingSchema = z
.object({
inventoryItemId: z.uuid(),
productName: z.string().trim().min(1).max(255),
categoryId: z.uuid(),
conditionId: z.uuid(),
askingPriceMinor: z.int().positive(),
notes: z.string().trim().max(10000).optional(),
})
.strict();