import { ApiProperty } from '@nestjs/swagger';
import { IsInt, IsString, Min, MinLength } from 'class-validator';

export class MeterUsageDto {
  @ApiProperty({ description: 'Usage metric identifier', example: 'api_calls' })
  @IsString()
  @MinLength(1)
  metric!: string;

  @ApiProperty({ description: 'Number of units consumed', minimum: 1, example: 1 })
  @IsInt()
  @Min(1)
  count!: number;
}
