import { IsOptional, IsString, IsNumber, Min } from 'class-validator';
import { ApiPropertyOptional } from '@nestjs/swagger';

export class QueryTransfersDto {
  @ApiPropertyOptional({ description: '角色筛选', enum: ['buyer', 'seller', 'all'], default: 'all' })
  @IsOptional()
  @IsString()
  role?: 'buyer' | 'seller' | 'all';

  @ApiPropertyOptional({ description: '每页条数', default: 20 })
  @IsOptional()
  @IsNumber()
  @Min(1)
  limit?: number;

  @ApiPropertyOptional({ description: '偏移量', default: 0 })
  @IsOptional()
  @IsNumber()
  @Min(0)
  offset?: number;
}
