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

export class ContributionRankingItemResponse {
  @ApiProperty({ description: '排名' })
  rank: number;

  @ApiProperty({ description: '账户序号' })
  accountSequence: string;

  @ApiProperty({ description: '有效算力（个人 + 已解锁）' })
  effectiveContribution: string;

  @ApiProperty({ description: '个人算力' })
  personalContribution: string;

  @ApiProperty({ description: '待解锁算力总和' })
  totalPending: string;

  @ApiProperty({ description: '已解锁算力总和' })
  totalUnlocked: string;
}

export class ContributionRankingResponse {
  @ApiProperty({ type: [ContributionRankingItemResponse] })
  data: ContributionRankingItemResponse[];
}

export class UserRankResponse {
  @ApiProperty({ description: '排名', nullable: true })
  rank: number | null;

  @ApiProperty({ description: '有效算力' })
  effectiveContribution: string;

  @ApiProperty({ description: '百分位', nullable: true })
  percentile: number | null;
}
