import { z } from "zod/v4"; export const createProjectSchema = z.object({ projectCode: z .string() .min(1, "Project code is required") .max(50, "Project code must be 50 characters or less"), name: z.string().min(1, "Name is required").max(200), description: z.string().max(2000).optional(), status: z.enum(["PIPELINE", "ACTIVE", "ON_HOLD", "COMPLETED", "CANCELED", "ARCHIVED"]), priority: z.enum(["LOW", "MEDIUM", "HIGH", "URGENT"]), startDate: z.string().optional(), dueDate: z.string().optional(), // Dow fields clientTeamId: z.string().optional(), omgJobNumber: z.string().max(50).optional(), // Category label (maps to Dow Project Category column from the XLSX: // Copywriting / Display / GIF / PDF / Print / Social / Static / Video) businessUnit: z.string().max(100).optional(), // Freeform carry-overs that can still be handy (owner, notes, etc.) quarter: z.string().max(20).optional(), requestor: z.string().max(2000).optional(), // Legacy HP fields kept in schema for back-compat but no longer in the form: formFactor: z.string().max(100).optional(), codeName: z.string().max(100).optional(), npiOrRefresh: z.string().max(50).optional(), workfrontId: z.string().max(100).optional(), omgCode: z.string().max(100).optional(), bmtId: z.string().max(100).optional(), estimatedCost: z.number().min(0).optional(), actualCost: z.number().min(0).optional(), agency: z.string().max(100).optional(), pipelineTemplateId: z.string().optional(), }); export const updateProjectSchema = createProjectSchema.partial(); export type CreateProjectInput = z.infer; export type UpdateProjectInput = z.infer;