import type { Account } from './accounting';
import type { User } from './user';

export interface CashTransaction {
    id: number;
    branch_id: number;
    type: 'income' | 'expense';
    related_account_id: number;
    cash_account_id: number;
    amount: number;
    date: string;
    description: string;
    created_by: number;
    created_at: string;
    updated_at: string;
    deleted_at: string | null;

    // Relationships
    related_account?: Account;
    cash_account?: Account;
    createdBy?: User;
    journalEntry?: { id: number };
}

export interface CashTransactionFilters {
    search?: string;
    type?: 'income' | 'expense';
    date_from?: string;
    date_to?: string;
}
