import { ApiProperty } from '@nestjs/swagger';

export class BalanceDTO {
  @ApiProperty({ description: '可用余额' })
  available: number;

  @ApiProperty({ description: '冻结余额' })
  frozen: number;
}

export class BalancesDTO {
  @ApiProperty({ type: BalanceDTO })
  usdt: BalanceDTO;

  @ApiProperty({ type: BalanceDTO })
  dst: BalanceDTO;

  @ApiProperty({ type: BalanceDTO })
  bnb: BalanceDTO;

  @ApiProperty({ type: BalanceDTO })
  og: BalanceDTO;

  @ApiProperty({ type: BalanceDTO })
  rwad: BalanceDTO;
}

export class RewardsDTO {
  @ApiProperty({ description: '待领取USDT' })
  pendingUsdt: number;

  @ApiProperty({ description: '待领取算力' })
  pendingHashpower: number;

  @ApiProperty({ description: '待领取过期时间', nullable: true })
  pendingExpireAt: string | null;

  @ApiProperty({ description: '可结算USDT' })
  settleableUsdt: number;

  @ApiProperty({ description: '可结算算力' })
  settleableHashpower: number;

  @ApiProperty({ description: '已结算USDT总额' })
  settledTotalUsdt: number;

  @ApiProperty({ description: '已结算算力总额' })
  settledTotalHashpower: number;

  @ApiProperty({ description: '已过期USDT总额' })
  expiredTotalUsdt: number;

  @ApiProperty({ description: '已过期算力总额' })
  expiredTotalHashpower: number;
}

export class WalletResponseDTO {
  @ApiProperty({ description: '钱包ID' })
  walletId: string;

  @ApiProperty({ description: '用户ID' })
  userId: string;

  @ApiProperty({ type: BalancesDTO, description: '各币种余额' })
  balances: BalancesDTO;

  @ApiProperty({ description: '算力' })
  hashpower: number;

  @ApiProperty({ type: RewardsDTO, description: '奖励信息' })
  rewards: RewardsDTO;

  @ApiProperty({ description: '钱包状态' })
  status: string;
}
