From 59c162b1b1bda509cc15b5fc296ca6b0568c4c6a Mon Sep 17 00:00:00 2001 From: quantum-grit Date: Mon, 2 Oct 2023 15:14:09 +0300 Subject: [PATCH] added: targetDate in withdrawal model --- apps/api/src/withdrawal/dto/create-withdrawal.dto.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/api/src/withdrawal/dto/create-withdrawal.dto.ts b/apps/api/src/withdrawal/dto/create-withdrawal.dto.ts index 0baf98c0c..1ac18ebc6 100644 --- a/apps/api/src/withdrawal/dto/create-withdrawal.dto.ts +++ b/apps/api/src/withdrawal/dto/create-withdrawal.dto.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger' import { Currency, WithdrawStatus } from '@prisma/client' -import { Expose } from 'class-transformer' -import { IsEnum, IsNumber, IsString, IsUUID, IsOptional } from 'class-validator' +import { Expose, Type } from 'class-transformer' +import { IsEnum, IsNumber, IsString, IsUUID, IsOptional, IsDate } from 'class-validator' export class CreateWithdrawalDto { @ApiProperty({ enum: WithdrawStatus }) @Expose() @@ -49,4 +49,11 @@ export class CreateWithdrawalDto { @IsOptional() @Expose() approvedById?: string + + @ApiProperty() + @Expose() + @IsOptional() + @IsDate() + @Type(() => Date) + targetDate?: Date | null }