feat: money requests

This commit is contained in:
Abdalhameed Ahmad
2025-09-08 21:38:11 +03:00
parent e6642b5a15
commit e1f50decfa
22 changed files with 449 additions and 10 deletions

View File

@ -0,0 +1,15 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsString } from 'class-validator';
import { i18nValidationMessage as i18n } from 'nestjs-i18n';
export class CreateMoneyRequestDto {
@ApiProperty({ example: 300.42 })
@IsNumber(
{ maxDecimalPlaces: 3 },
{ message: i18n('validation.IsNumber', { path: 'general', property: 'moneyRequest.amount' }) },
)
amount!: number;
@ApiProperty({ example: 'For school supplies' })
@IsString({ message: i18n('validation.IsString', { path: 'general', property: 'moneyRequest.reason' }) })
reason!: string;
}