/**
 * Workflow API Models
 * Models for workflow configuration and management
 */

export interface WorkflowStage {
  id: string;
  name: string;
  description?: string;
  departmentId: string;
  order: number;
  isRequired: boolean;
  metadata?: Record<string, any>;
}

export interface CreateWorkflowDto {
  name: string;
  description?: string;
  requestType: string;
  stages: WorkflowStage[];
  metadata?: Record<string, any>;
}

export interface UpdateWorkflowDto {
  name?: string;
  description?: string;
  stages?: WorkflowStage[];
  metadata?: Record<string, any>;
}

export interface WorkflowResponseDto {
  id: string;
  name: string;
  description?: string;
  requestType: string;
  stages: WorkflowStage[];
  isActive: boolean;
  metadata?: Record<string, any>;
  createdAt: string;
  updatedAt: string;
}

export interface WorkflowPreviewDto {
  id: string;
  name: string;
  description?: string;
  requestType: string;
  stages: WorkflowStagePreviewDto[];
  isActive: boolean;
}

export interface WorkflowStagePreviewDto {
  id: string;
  name: string;
  description?: string;
  departmentCode: string;
  departmentName: string;
  order: number;
  isRequired: boolean;
}

export interface WorkflowValidationResultDto {
  isValid: boolean;
  errors?: string[];
  warnings?: string[];
}

export interface PaginatedWorkflowsResponse {
  data: WorkflowResponseDto[];
  total: number;
  page: number;
  limit: number;
  totalPages: number;
  hasNextPage: boolean;
}
