18 lines
446 B
TypeScript
18 lines
446 B
TypeScript
import { IsNumber, IsOptional, Min } from 'class-validator';
|
|
import { ApiPropertyOptional } from '@nestjs/swagger';
|
|
|
|
/**
|
|
* DTO for converting user score (points) to wallet balance.
|
|
*/
|
|
export class ConvertScoreToWalletDto {
|
|
@ApiPropertyOptional({
|
|
description: 'Amount of points to convert. If not provided, converts all available points',
|
|
example: 100,
|
|
minimum: 1,
|
|
})
|
|
@IsOptional()
|
|
@IsNumber()
|
|
@Min(1)
|
|
points?: number;
|
|
}
|