// @generated — do not edit
import { defineLifecycle } from "@tailor-platform/erp-kit/core";

export const purchaseOrderLifecycle = defineLifecycle({
    submit: { from: ["DRAFT"], to: "SUBMITTED" },
    reject: { from: ["SUBMITTED"], to: "DRAFT" },
    approve: { from: ["SUBMITTED"], to: "ORDERED" },
    cancel: { from: ["DRAFT", "SUBMITTED", "ORDERED"], to: "CANCELLED" },
    close: { from: ["ORDERED"], to: "CLOSED" },
});

export type PurchaseOrderStatus = typeof purchaseOrderLifecycle.states[number];
