import { Page, BaseQuery } from '@/types/base';

export interface WorkflowTemplateWithInstances {
    id: number;
    name: string;
    businessKey: string;
    lastExecutionTime: string;
    lastExecutionStatus: string;
}

export interface WorkflowTemplateWithInstancesQuery {

}

export interface WorkflowInstanceStage {
    id: number | null;
    nodeId: string;
    nodeName: string;
    nodeType: string;
    status: string;
    startTime: string | null;
    endTime: string | null;
}

export interface WorkflowHistoricalInstance {
    id: number;
    processInstanceId: string;
    processDefinitionId: string;
    businessKey: string;
    status: string;
    startTime: string;
    endTime: string | null;
    stages: WorkflowInstanceStage[];
}

export interface WorkflowHistoricalInstanceQuery extends BaseQuery {
    workflowDefinitionId?: number;
}
