19 lines
391 B
TypeScript
19 lines
391 B
TypeScript
import { IsIn, IsInt, IsNumber, IsOptional, IsString, MaxLength, NotEquals } from 'class-validator';
|
|
|
|
export class ChangeWalletBalanceDto {
|
|
@IsInt()
|
|
studentId: number;
|
|
|
|
@IsNumber({ maxDecimalPlaces: 2 })
|
|
@NotEquals(0)
|
|
amount: number;
|
|
|
|
@IsIn(['recharge', 'adjustment'])
|
|
type: 'recharge' | 'adjustment';
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(300)
|
|
description?: string;
|
|
}
|