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

export class PositionDistributionResponse {
  @ApiProperty({ description: '省份代码', nullable: true })
  provinceCode: string | null;

  @ApiProperty({ description: '城市代码', nullable: true })
  cityCode: string | null;

  @ApiProperty({ description: '认种数量' })
  treeCount: number;
}

export class PlantingPositionResponse {
  @ApiProperty({ description: '总认种数量' })
  totalTreeCount: number;

  @ApiProperty({ description: '有效认种数量（已开启挖矿）' })
  effectiveTreeCount: number;

  @ApiProperty({ description: '待生效认种数量' })
  pendingTreeCount: number;

  @ApiProperty({
    description: '省市分布',
    type: [PositionDistributionResponse],
  })
  distributions: PositionDistributionResponse[];
}
