export interface Company {
    id: number;
    name: string;
}

export interface Branch {
    id: number;
    name: string;
    company_id: number;
}

export interface Department {
    id: number;
    name: string;
    company_id: number;
}

export interface Bank {
    id: number;
    name: string;
}

export interface Budget {
    id: number;
    name: string;
    company_name?: string;
    branch_name?: string;
    department_name?: string;
    coa_name?: string;
}

export interface SimpleUser {
    id: number;
    name: string;
}

export interface FundRequestAttachment {
    id: number;
    name: string;
    path?: string;
    url?: string | null;
    created_at?: string;
}

export interface FundRequest {
    id: number;
    code?: string;
    company_id: number;
    branch_id: number;
    department_id: number;
    applicant_id: number;
    budget_id?: number | null;
    description: string;
    notes?: string | null;
    invoice_number?: string | null;
    amount: number;
    tax_amount?: number;
    paid_amount?: number;
    account_name: string;
    account_number: string;
    bank_id: number;
    transaction_type?: string | null;
    scheduled_payment_date?: string | null;
    status?: string | null;
    submission_status?: string | null;
    tax_object?: string | null;
    transfer_date?: string | null;
    paid_date?: string | null;
    paid_status?: number | null;
    cost_control_status?: string | null;
    cost_control_approved_at?: string | null;
    cost_control_approved_by?: number | null;
    cost_control_approver?: SimpleUser | null;
    tax_officer_status?: string | null;
    tax_officer_approved_at?: string | null;
    tax_officer_approved_by?: number | null;
    tax_officer_approver?: SimpleUser | null;
    spv_finance_status?: string | null;
    spv_finance_approved_at?: string | null;
    spv_finance_approved_by?: number | null;
    spv_finance_approver?: SimpleUser | null;
    manager_finance_status?: string | null;
    manager_finance_approved_at?: string | null;
    manager_finance_approved_by?: number | null;
    manager_finance_approver?: SimpleUser | null;
    report_status?: string | null;
    created_at: string;
    updated_at?: string;
    company?: Company;
    branch?: Branch;
    department?: Department;
    applicant?: SimpleUser;
    budget?: Budget;
    bank?: Bank;
    attachments?: FundRequestAttachment[];
    payment_attachments?: FundRequestAttachment[];
    report_attachments?: FundRequestAttachment[];
}

export interface FundRequestFormData {
    company_id: number;
    branch_id: number;
    department_id: number;
    applicant_id: number;
    description: string;
    invoice_number?: string;
    amount: number;
    account_name: string;
    account_number: string;
    bank_id: number;
    attachments?: File[];
}
