project router

This commit is contained in:
2025-07-02 23:34:42 +02:00
parent 9f58cc3207
commit 3195aaae81
7 changed files with 170 additions and 4 deletions

View File

@@ -0,0 +1,11 @@
import { project } from "~/server/db/schema"
import { createInsertSchema, createUpdateSchema, createSelectSchema} from 'drizzle-zod'
import { z } from "zod";
export const selectSchema = createSelectSchema(project);
export const insertSchema = createInsertSchema(project);
export const updateSchema = createUpdateSchema(project);
export const getSchema = selectSchema.pick({id: true});
export const updateRouteSchema = z.object({
by: selectSchema.pick({id:true}),
update: updateSchema
})