feat(19-01): update Zod schemas, types, and seed script for reference model
- Add globalItemId and purchasePriceCents to createItemSchema - Add globalItemId to createCandidateSchema - Add tags param to searchGlobalItemsSchema - Remove linkItemSchema from schemas and types - Replace ItemGlobalLink with Tag and GlobalItemTag types - Convert seedGlobalItems to async, add seedTags with 30 curated tags
This commit is contained in:
@@ -2,10 +2,11 @@ import type { z } from "zod";
|
||||
import type {
|
||||
categories,
|
||||
globalItems,
|
||||
itemGlobalLinks,
|
||||
globalItemTags,
|
||||
items,
|
||||
setupItems,
|
||||
setups,
|
||||
tags,
|
||||
threadCandidates,
|
||||
threads,
|
||||
} from "../db/schema.ts";
|
||||
@@ -15,7 +16,6 @@ import type {
|
||||
createItemSchema,
|
||||
createSetupSchema,
|
||||
createThreadSchema,
|
||||
linkItemSchema,
|
||||
reorderCandidatesSchema,
|
||||
resolveThreadSchema,
|
||||
searchGlobalItemsSchema,
|
||||
@@ -49,7 +49,6 @@ export type UpdateClassification = z.infer<typeof updateClassificationSchema>;
|
||||
|
||||
// Global item types
|
||||
export type SearchGlobalItems = z.infer<typeof searchGlobalItemsSchema>;
|
||||
export type LinkItem = z.infer<typeof linkItemSchema>;
|
||||
export type UpdateProfile = z.infer<typeof updateProfileSchema>;
|
||||
|
||||
// Types inferred from Drizzle schema
|
||||
@@ -60,4 +59,5 @@ export type ThreadCandidate = typeof threadCandidates.$inferSelect;
|
||||
export type Setup = typeof setups.$inferSelect;
|
||||
export type SetupItem = typeof setupItems.$inferSelect;
|
||||
export type GlobalItem = typeof globalItems.$inferSelect;
|
||||
export type ItemGlobalLink = typeof itemGlobalLinks.$inferSelect;
|
||||
export type Tag = typeof tags.$inferSelect;
|
||||
export type GlobalItemTag = typeof globalItemTags.$inferSelect;
|
||||
|
||||
Reference in New Issue
Block a user