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

export class SystemAccountDto {
  @ApiProperty({ description: '账户类型' })
  accountType: string;

  @ApiProperty({ description: '账户名称' })
  name: string;

  @ApiProperty({ description: '总算力' })
  totalContribution: string;
}

export class ContributionByTypeDto {
  @ApiProperty({ description: '个人算力' })
  personal: string;

  @ApiProperty({ description: '团队层级算力' })
  teamLevel: string;

  @ApiProperty({ description: '团队奖励算力' })
  teamBonus: string;
}

export class ContributionStatsResponse {
  @ApiProperty({ description: '总用户数' })
  totalUsers: number;

  @ApiProperty({ description: '总账户数' })
  totalAccounts: number;

  @ApiProperty({ description: '有算力的账户数' })
  accountsWithContribution: number;

  @ApiProperty({ description: '总认种数' })
  totalAdoptions: number;

  @ApiProperty({ description: '已处理认种数' })
  processedAdoptions: number;

  @ApiProperty({ description: '未处理认种数' })
  unprocessedAdoptions: number;

  @ApiProperty({ description: '总算力' })
  totalContribution: string;

  @ApiProperty({ type: ContributionByTypeDto, description: '按类型分布的算力' })
  contributionByType: ContributionByTypeDto;

  @ApiProperty({ type: [SystemAccountDto], description: '系统账户' })
  systemAccounts: SystemAccountDto[];

  @ApiProperty({ description: '未分配算力总量' })
  totalUnallocated: string;

  @ApiProperty({ description: '按类型分布的未分配算力' })
  unallocatedByType: Record<string, string>;
}
