import { FumigationPlan, FumigationPlanDraft, } from "./fumigation-plan/fumigation-plan"; export type Job = { _id: string; // External job number provided by government job_number: string; // The id of the port to which the vessel is arriving port_id: string; // The id of the vessel being fumigated vessel_id: string; // Estimated time of arrival to port eta: Date; // All the details of the fumigation itself. fumigation_plan: FumigationPlan; // What is the current status of the job status: "pending" | "ongoing" | "completed" | "failed"; // Is the job ready and has all the nesessary details to start? validation_errors: string[]; // Once the job started (status === "ongoing") then we store the id of the ongoing job here so the control center could be access via the job's table ongoing_job_id?: string | null; }; export type JobDraft = Omit & { _id?: string; status?: "pending" | "ongoing" | "completed" | "failed"; fumigation_plan: FumigationPlanDraft; };