Compare commits

..

No commits in common. "8970f46a8059736e9bf8c90562e9111585c3f7b5" and "f11c306ac69b3cdc0c6fefc7cec4c7e69e38035b" have entirely different histories.

2 changed files with 10 additions and 15 deletions

3
.gitignore vendored
View file

@ -27,8 +27,6 @@ out/
build
dist
# OpenSpec / Environment specific files
.opencode/
# Debug
npm-debug.log*
@ -38,3 +36,4 @@ yarn-error.log*
# Misc
.DS_Store
*.pem
opencode.json

View file

@ -2,33 +2,29 @@ import { createInsertSchema, createSelectSchema, createUpdateSchema } from "driz
import { pipe, picklist } from "valibot";
import { projects, tasks, PROJECT_STATUSES, TASK_STATUSES, PRIORITIES } from "./drizzle/index";
const createProjectStatusSchema = (schema: any) => pipe(schema, picklist([...PROJECT_STATUSES])) as any;
const createTaskStatusSchema = (schema: any) => pipe(schema, picklist([...TASK_STATUSES])) as any;
const createPrioritySchema = (schema: any) => pipe(schema, picklist([...PRIORITIES])) as any;
export const projectSelect = createSelectSchema(projects, {
status: createProjectStatusSchema,
status: (schema: any) => pipe(schema, picklist([...PROJECT_STATUSES])) as any,
});
export const taskSelect = createSelectSchema(tasks, {
status: createTaskStatusSchema,
priority: createPrioritySchema,
status: (schema: any) => pipe(schema, picklist([...TASK_STATUSES])) as any,
priority: (schema: any) => pipe(schema, picklist([...PRIORITIES])) as any,
});
export const projectInsert = createInsertSchema(projects, {
status: createProjectStatusSchema,
status: (schema: any) => pipe(schema, picklist([...PROJECT_STATUSES])) as any,
});
export const projectUpdate = createUpdateSchema(projects, {
status: createProjectStatusSchema,
status: (schema: any) => pipe(schema, picklist([...PROJECT_STATUSES])) as any,
});
export const taskInsert = createInsertSchema(tasks, {
status: createTaskStatusSchema,
priority: createPrioritySchema,
status: (schema: any) => pipe(schema, picklist([...TASK_STATUSES])) as any,
priority: (schema: any) => pipe(schema, picklist([...PRIORITIES])) as any,
});
export const taskUpdate = createUpdateSchema(tasks, {
status: createTaskStatusSchema,
priority: createPrioritySchema,
status: (schema: any) => pipe(schema, picklist([...TASK_STATUSES])) as any,
priority: (schema: any) => pipe(schema, picklist([...PRIORITIES])) as any,
});