export interface HrLoan {
  id: number;
  company_id: number;
  code: string;
  employee_id: number;
  loan_type: string;
  amount: number;
  interest_rate: number;
  total_amount: number;
  installment_amount: number;
  number_of_installments: number;
  paid_installments: number;
  remaining_amount: number;
  start_date: string;
  end_date: string | null;
  status: string;
  approved_by: number | null;
  approved_at: string | null;
  reason: string | null;
  notes: string | null;
  employee?: any;
  installments?: HrLoanInstallment[];
  created_at: string;
  updated_at: string;
}

export interface CreateHrLoan {
  employee_id: number;
  loan_type?: string;
  amount: number;
  interest_rate?: number;
  number_of_installments: number;
  start_date: string;
  reason?: string | null;
  notes?: string | null;
}

export interface UpdateHrLoan extends Partial<CreateHrLoan> {}

export interface HrLoanInstallment {
  id: number;
  loan_id: number;
  installment_number: number;
  amount: number;
  due_date: string;
  paid_date: string | null;
  status: string;
}
