import { ApiProperty } from '@nestjs/swagger'; /** * 状态分布 DTO */ export class StatusDistributionDto { @ApiProperty({ description: '已支付状态的认种数', example: 100 }) paid: number; @ApiProperty({ description: '资金已分配状态的认种数', example: 80 }) fundAllocated: number; @ApiProperty({ description: '底池已排期状态的认种数', example: 50 }) poolScheduled: number; @ApiProperty({ description: '底池已注入状态的认种数', example: 30 }) poolInjected: number; @ApiProperty({ description: '挖矿已开启状态的认种数(有效认种)', example: 500 }) miningEnabled: number; } /** * 今日统计 DTO */ export class TodayStatsDto { @ApiProperty({ description: '今日认种棵数', example: 10 }) treeCount: number; @ApiProperty({ description: '今日订单数', example: 5 }) orderCount: number; @ApiProperty({ description: '今日认种金额', example: '1000.00' }) amount: string; } /** * 全局统计响应 DTO */ export class GlobalStatsResponseDto { @ApiProperty({ description: '总认种棵数(PAID及之后状态)', example: 760 }) totalTreeCount: number; @ApiProperty({ description: '总订单数', example: 150 }) totalOrderCount: number; @ApiProperty({ description: '总认种金额', example: '76000.00' }) totalAmount: string; @ApiProperty({ description: '按状态分布的认种数', type: StatusDistributionDto }) statusDistribution: StatusDistributionDto; @ApiProperty({ description: '今日统计', type: TodayStatsDto }) todayStats: TodayStatsDto; @ApiProperty({ description: '统计计算时间', example: '2026-01-04T12:00:00.000Z' }) calculatedAt: string; }