From 380335857c35417aecbb580a8dc651f234a3cd84 Mon Sep 17 00:00:00 2001 From: GloireMutaliko21 Date: Tue, 22 Oct 2024 07:07:10 +0200 Subject: [PATCH] fix: add type validation for sprint entity --- .../core/src/organization-sprint/organization-sprint.entity.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/src/organization-sprint/organization-sprint.entity.ts b/packages/core/src/organization-sprint/organization-sprint.entity.ts index 1637d1b668..df195e7720 100644 --- a/packages/core/src/organization-sprint/organization-sprint.entity.ts +++ b/packages/core/src/organization-sprint/organization-sprint.entity.ts @@ -1,6 +1,7 @@ import { JoinColumn } from 'typeorm'; import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { IsDate, IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator'; +import { Type } from 'class-transformer'; import { isMySQL, isPostgres } from '@gauzy/config'; import { ID, @@ -56,12 +57,14 @@ export class OrganizationSprint extends TenantOrganizationBaseEntity implements @ApiPropertyOptional({ type: () => Date }) @IsDate() @IsOptional() + @Type(() => Date) @MultiORMColumn({ nullable: true }) startDate?: Date; @ApiPropertyOptional({ type: () => Date }) @IsDate() @IsOptional() + @Type(() => Date) @MultiORMColumn({ nullable: true }) endDate?: Date;