export type AssignmentMode = 'fza' | 'payroll' | 'both';

export interface SpecialAssignmentOut {
  id: string;
  user_id: string;
  company_id: string;
  date_from: string;
  date_to: string;
  factor: number;
  mode: AssignmentMode;
  description: string | null;
  label: string | null;
}

export interface SpecialAssignmentCreate {
  date_from: string;
  date_to: string;
  factor: number;
  mode: AssignmentMode;
  description?: string;
  label?: string;
}

// ── Payroll Report ────────────────────────────────────────────────────────────

export interface PayrollAssignmentEntry {
  assignment_id: string;
  label: string | null;
  date_from: string;
  date_to: string;
  factor: number;
  normal_hours: number;
  factor_hours: number;
  extra_hours: number;
}

export interface PayrollAssignmentRow {
  user_id: string;
  user_name: string;
  personnel_number: string | null;
  assignments: PayrollAssignmentEntry[];
  total_normal_hours: number;
  total_factor_hours: number;
  total_extra_hours: number;
}

export interface PayrollAssignmentReport {
  year: number;
  month: number;
  rows: PayrollAssignmentRow[];
}
