export interface AgentDTO {
    id: string;
    matricula: string;
    nif: string;
    biNumber: string;
    fullName: string;
    birthDate: string;
    hireDate: string;
    posseDate?: string;
    terminationDate?: string;
    appointmentType: string;
    functionalSituation: string;
    status: string;
    literaryQualification?: string;
    salaryCategory?: string;
    salaryGrade?: string;
    salaryStep?: string;
    eligibleDependentsCount?: number;
    orgUnit?: string;
    position?: string;
    nationality?: string;
    phone?: string;
    email?: string;
    address?: string;
    statusChangeReason?: string;

    // Novos campos para Vida Laboral
    eventEffectiveDate?: string;
    eventPublicationDate?: string;
    eventDocumentRef?: string;

    // Dados relacionados
    activeContract?: AgentContractDTO;
    primaryBankAccount?: AgentBankAccountDTO;
}

export interface AgentContractDTO {
    id: string;
    contractType: string;
    startDate: string;
    endDate?: string;
    weeklyHours?: number;
    baseSalaryRef?: number;
    orgUnit?: string;
    position?: string;
    salaryCategory?: string;
    salaryGrade?: string;
    salaryStep?: string;
    legalActReference?: string;
    isActive: boolean;
}

export interface AgentBankAccountDTO {
    id: string;
    agentId: string;
    bank: string;
    branchCode: string;
    accountNumber: string;
    iban?: string;
    isPrimary: boolean;
}

export interface CareerTimelineDTO {
    date: string;
    eventType: string;
    eventTypeName: string;
    reason?: string;
    documentRef?: string;
    totalBaseAmount?: number;
    cargoAmount?: number;
    exercicioAmount?: number;
    changeSummary?: string;
}

export interface AgentStatusHistoryDTO {
    id: string;
    previousStatus: string;
    newStatus: string;
    previousFunctionalSituation?: string;
    newFunctionalSituation?: string;
    eventType?: string;
    reason?: string;
    changedAt: string;
    changedBy: string;
    changeLog?: string;
}

export interface AgentStatsDTO {
    total: number;
    active: number;
    inactive: number;
    suspended: number;
    terminated: number;
}

export interface PayrollPeriodDTO {
    id: string;
    fiscalYear: number;
    month: number;
    startDate: string;
    endDate: string;
    status: 'OPEN' | 'CLOSED';
}

export interface PayrollRunDTO {
    id: string;
    periodId: string;
    ministry?: string;
    ministryName?: string;
    orgUnit?: string;
    orgUnitName?: string;
    runType: 'NORMAL' | 'SUPPLEMENTARY';
    status: 'PENDING' | 'GENERATED' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
    createdAt: string;
    createdBy?: string;
    items?: PayrollItemDTO[];
}

export interface PayrollItemDTO {
    id: string;
    agent: string;
    agentName?: string;
    lineType: 'EARNING' | 'DEDUCTION';
    earningTypeId?: string;
    deductionTypeId?: string;
    description: string;
    quantity: number;
    unitAmount: number;
    totalAmount: number;
    budgetLine?: string;
}

export interface PerformanceEvaluationDTO {
    id: string;
    agentId: string;
    agentName?: string;
    evaluatorId?: string;
    evaluationDate: string;
    score: number;
    mention: string;
    observations?: string;
    status: 'DRAFT' | 'FINALIZED';
}
