/**
 * Department API Models
 * Models for department management
 */

export interface CreateDepartmentDto {
  code: string;
  name: string;
  description?: string;
  contactEmail?: string;
  contactPhone?: string;
  webhookUrl?: string;
}

export interface UpdateDepartmentDto {
  code?: string;
  name?: string;
  description?: string;
  contactEmail?: string;
  contactPhone?: string;
  webhookUrl?: string;
}

export interface DepartmentResponseDto {
  id: string;
  code: string;
  name: string;
  description?: string;
  contactEmail?: string;
  contactPhone?: string;
  webhookUrl?: string;
  isActive: boolean;
  createdAt: string;
  updatedAt: string;
  totalApplicants: number;
  issuedCredentials: number;
  lastWebhookAt?: string;
}

export interface DepartmentStatsDto {
  departmentCode: string;
  departmentName: string;
  totalApplicants: number;
  totalCredentialsIssued: number;
  isActive: boolean;
  createdAt: string;
  updatedAt: string;
  lastWebhookAt?: string;
  issueRate: number;
}

export interface CreateDepartmentWithCredentialsResponse {
  apiKey: string;
  apiSecret: string;
  department: DepartmentResponseDto;
}

export interface RegenerateApiKeyResponse {
  apiKey: string;
  apiSecret: string;
}

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