import { Branch } from './Branch';
import { OrganisationUnit } from './OrganisationUnit';

export interface Transfer {
  id: string;
  employee_id: string;
  from_branch_id: string;
  to_branch_id: string;
  from_unit_id?: string;
  to_unit_id?: string;
  transfer_date: string;
  effective_date: string;
  reason?: string;
  status: 'pending' | 'approved' | 'rejected' | 'completed';
  approved_by?: string;
  created_at: string;
  updated_at: string;
  from_branch?: Branch;
  to_branch?: Branch;
  from_unit?: OrganisationUnit;
  to_unit?: OrganisationUnit;
}

export interface CreateTransferPayload {
  id?: string;
  from_branch_id: string;
  to_branch_id: string;
  from_unit_id?: string;
  to_unit_id?: string;
  transfer_date: string;
  effective_date: string;
  reason?: string;
  status?: 'pending' | 'approved' | 'rejected' | 'completed';
}

export type UpdateTransferPayload = {
  employee_id?: string;
} & CreateTransferPayload;

export interface DeleteTransferPayload {
  employee_id: string;
  transfer_id: string;
}

export interface DeleteTransferResponse {
  message: string;
  id?: string;
}
