8c830eae70
Add new DB schemas: companies, agent_api_keys, approvals, cost_events, heartbeat_runs, issue_comments. Add corresponding shared types and validators. Update existing schemas (agents, goals, issues, projects) with new fields for company association, budgets, and richer metadata. Generate initial Drizzle migration. Update seed data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
624 B
TypeScript
18 lines
624 B
TypeScript
import { z } from "zod";
|
|
import { PROJECT_STATUSES } from "../constants.js";
|
|
|
|
export const createProjectSchema = z.object({
|
|
goalId: z.string().uuid().optional().nullable(),
|
|
name: z.string().min(1),
|
|
description: z.string().optional().nullable(),
|
|
status: z.enum(PROJECT_STATUSES).optional().default("backlog"),
|
|
leadAgentId: z.string().uuid().optional().nullable(),
|
|
targetDate: z.string().optional().nullable(),
|
|
});
|
|
|
|
export type CreateProject = z.infer<typeof createProjectSchema>;
|
|
|
|
export const updateProjectSchema = createProjectSchema.partial();
|
|
|
|
export type UpdateProject = z.infer<typeof updateProjectSchema>;
|