// Shared domain types. // SQLite (Prisma) supports no native enums, so these former enums are string-literal // unions kept here as the single source of truth for both client and server code. export type Role = | 'ADMIN' | 'QC' | 'PRODUCTION' | 'PRODUCTION_LEAD' | 'LOGISTICS_LEAD' | 'MANAGEMENT' export type FieldType = | 'SHORT_TEXT' | 'LONG_TEXT' | 'NUMBER' | 'DATE' | 'SINGLE_CHOICE' | 'MULTI_CHOICE' | 'RATING' | 'PHOTO' export type FormStatus = | 'DRAFT' | 'ACTIVE' | 'SUSPENDED' | 'REVIEW_READY' | 'STANDARD_SET' | 'ARCHIVED' export type NCRSeverity = 'OBSERVATION' | 'MINOR' | 'MAJOR' export type NCRStatus = 'OPEN' | 'INVESTIGATING' | 'ESCALATED' | 'RESOLVED' export type EscapeStatus = 'OPEN' | 'INVESTIGATING' | 'RESOLVED' | 'ESCALATED' export type CAPAPriority = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' export type CAPAStatus = 'OPEN' | 'IN_PROGRESS' | 'OVERDUE' | 'CLOSED' export type NotifType = | 'CAPA_OVERDUE' | 'CAPA_ASSIGNED' | 'AUDIT_DUE' | 'NCR_ESCALATED' | 'FORM_REVIEW_READY' | 'DOC_EXPIRING' | 'STANDARD_APPROVED' | 'SOLUTION_CONFIRMED' export type ShipmentItemType = 'FORM_DATA' | 'NCR_FIX' | 'AUDIT' | 'OTHER' // The authenticated user as exposed to the client (no password/session fields). export interface AppUser { id: string email: string name: string role: Role department?: string | null active?: boolean }