diff --git a/src/domain/schemas.ts b/src/domain/schemas.ts index 078232d..820b6b0 100644 --- a/src/domain/schemas.ts +++ b/src/domain/schemas.ts @@ -54,6 +54,7 @@ export const ProcessSchema = z.object({ automationInvestment: z.number().min(0).default(0), createdAt: z.number(), updatedAt: z.number(), + areaId: z.string().uuid().nullable(), }) export type ResourceInput = z.infer diff --git a/src/domain/types.ts b/src/domain/types.ts index 497c22c..5576779 100644 --- a/src/domain/types.ts +++ b/src/domain/types.ts @@ -22,6 +22,8 @@ export interface Process { updatedBy: string // 🆕 Sprint 4 — UUID del usuario que hizo el último update orgId: string | null // 🆕 Sprint 7 — organización dueña del proceso (null = proceso interno InQ) orgName?: string | null // 🆕 Sprint 7 — nombre de la org (poblado por getById via JOIN, no se persiste) + areaId: string | null // 🆕 Sprint 8 — área de la org (null = sin área) + areaName?: string | null // 🆕 Sprint 8 — poblado via JOIN en getById } export type ActivityType = 'task' | 'subprocess' @@ -89,6 +91,14 @@ export interface ProcessGroup { updatedAt: number // timestamp Unix ms } +export interface Area { + id: string + orgId: string + name: string + description: string | null + createdAt: number // timestamp Unix ms +} + export interface AppSettings { id: 'singleton' // siempre un único registro por instalación groupLabel: string // etiqueta configurable para el nivel de agrupación. Default: 'Cliente'