export interface ProcessEfficiency {
  processDefinitionId: number
  processName: string
  instanceCount: number
  avgDurationMinutes: number
  maxDurationMinutes: number
  minDurationMinutes: number
  nodeStats?: NodeStayStat[]
}

export interface NodeStayStat {
  nodeId: string
  nodeName: string
  processDefinitionId?: number
  processName?: string
  taskCount: number
  avgStayMinutes: number
  maxStayMinutes: number
}

export interface StuckInstance {
  instanceId: number
  instanceNo: string
  title: string
  processDefinitionId?: number
  processName?: string
  applicantId?: number
  applicantName?: string
  nodeId: string
  nodeName: string
  taskCreateTime: string
  stayMinutes: number
}

export interface AnalysisOverview {
  totalInstances: number
  completedCount: number
  runningCount: number
  rejectedCount: number
  revokedCount: number
  timeoutCount: number
  timeoutRate: number
  avgDurationMinutes: number
}

export interface StatusDistribution {
  status: number
  statusName?: string
  count: number
}

export interface Trend {
  date: string
  startedCount: number
  completedCount: number
  rejectedCount: number
}

export interface EfficiencyQuery {
  startTime?: string
  endTime?: string
  processDefinitionId?: number
}

export interface OverviewQuery {
  startTime?: string
  endTime?: string
  processDefinitionId?: number
}

export interface StuckInstanceQuery {
  nodeId?: string
  processDefinitionId?: number
  minStayMinutes?: number
}
