chore: import DH V2 D5.6.4 production baseline
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Transform, Type } from 'class-transformer';
|
||||
import { IsEnum, IsNumber, IsOptional, IsString, IsUUID, Max, MaxLength, Min, MinLength } from 'class-validator';
|
||||
import { AreaOrganizationRole } from '../../database/entities';
|
||||
|
||||
export class CreateAreaCompanyRelationDto {
|
||||
@IsUUID('4') areaId!: string;
|
||||
@IsUUID('4') companyId!: string;
|
||||
@IsOptional() @IsEnum(AreaOrganizationRole) relationRole: AreaOrganizationRole = AreaOrganizationRole.OPERATOR;
|
||||
@IsOptional() @Type(() => Number) @IsNumber({ maxDecimalPlaces: 4 }) @Min(0.0001) @Max(100) participationPercent?: number | null;
|
||||
@IsOptional() @Transform(({ value }) => typeof value === 'string' && value.trim() ? value.trim() : null) @IsString() @MaxLength(240) legalInstrument?: string | null;
|
||||
@IsOptional() @IsUUID('4') sourceDocumentId?: string | null;
|
||||
@Transform(({ value }) => (typeof value === 'string' ? value.trim() : value)) @IsString() @MinLength(3) @MaxLength(1000) reason!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user