feat: add student wallet utility billing
This commit is contained in:
18
apps/server/src/wallets/dto/wallet.dto.ts
Normal file
18
apps/server/src/wallets/dto/wallet.dto.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user