import { WithdrawalOrder } from '@/domain/aggregates';
import { WithdrawalStatus } from '@/domain/value-objects';
import { RepositorySaveOptions } from '@/infrastructure/persistence/unit-of-work';

export interface IWithdrawalOrderRepository {
  save(order: WithdrawalOrder, options?: RepositorySaveOptions): Promise<WithdrawalOrder>;
  findById(orderId: bigint): Promise<WithdrawalOrder | null>;
  findByOrderNo(orderNo: string): Promise<WithdrawalOrder | null>;
  findByUserId(userId: bigint, status?: WithdrawalStatus): Promise<WithdrawalOrder[]>;
  findByAccountSequence(accountSequence: string, status?: WithdrawalStatus): Promise<WithdrawalOrder[]>;
  findPendingOrders(): Promise<WithdrawalOrder[]>;
  findFrozenOrders(): Promise<WithdrawalOrder[]>;
  findBroadcastedOrders(): Promise<WithdrawalOrder[]>;
}

export const WITHDRAWAL_ORDER_REPOSITORY = Symbol('IWithdrawalOrderRepository');
