17 lines
463 B
TypeScript
17 lines
463 B
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { Type } from 'class-transformer';
|
|
import { IsNumber, IsOptional, IsString, Min } from 'class-validator';
|
|
|
|
export class AdminAddPaymentDto {
|
|
@ApiProperty({ description: 'Payment amount', minimum: 1 })
|
|
@Type(() => Number)
|
|
@IsNumber()
|
|
@Min(1)
|
|
amount!: number;
|
|
|
|
@ApiPropertyOptional({ description: 'Payment description' })
|
|
@IsOptional()
|
|
@IsString()
|
|
description?: string;
|
|
}
|