import { FiatWithdrawalOrder } from '@/domain/aggregates';
import { FiatWithdrawalStatus } from '@/domain/value-objects/fiat-withdrawal-status.enum';

export const FIAT_WITHDRAWAL_ORDER_REPOSITORY = Symbol('FIAT_WITHDRAWAL_ORDER_REPOSITORY');

export interface IFiatWithdrawalOrderRepository {
  /**
   * 保存法币提现订单
   */
  save(order: FiatWithdrawalOrder): Promise<FiatWithdrawalOrder>;

  /**
   * 根据订单号查找
   */
  findByOrderNo(orderNo: string): Promise<FiatWithdrawalOrder | null>;

  /**
   * 根据用户 ID 查找订单列表
   */
  findByUserId(userId: bigint): Promise<FiatWithdrawalOrder[]>;

  /**
   * 根据账户序列号查找订单列表
   */
  findByAccountSequence(accountSequence: string): Promise<FiatWithdrawalOrder[]>;

  /**
   * 根据状态查找订单列表
   */
  findByStatus(status: FiatWithdrawalStatus): Promise<FiatWithdrawalOrder[]>;

  /**
   * 根据多个状态查找订单列表
   */
  findByStatuses(statuses: FiatWithdrawalStatus[]): Promise<FiatWithdrawalOrder[]>;

  /**
   * 获取待审核订单列表
   */
  findPendingReview(): Promise<FiatWithdrawalOrder[]>;

  /**
   * 获取待打款订单列表
   */
  findPendingPayment(): Promise<FiatWithdrawalOrder[]>;
}
