File

src/user/dto/create-user.dto.ts

Extends

BankDetailsDTO

Index

Properties

Properties

address
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@MinLength(3)
@MaxLength(300)
@IsOptional()
cmsFields
Type : CmsFieldDTO[]
Decorators :
@IsDefined()
@IsArray()
@ArrayUnique()
@ValidateNested()
@Type(undefined)
dealerId
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
@MaxLength(300)
@IsOptional()
endUserRole
Type : EndUserRoles
Decorators :
@ApiProperty({enumName: 'End user roles', enum: undefined})
@IsEnum(EndUserRoles)
Optional legalDocuments
Type : FileDTO
Decorators :
@IsOptional()
@IsDefined()
@IsNotEmptyObject()
@IsObject()
@ValidateNested()
@Type(undefined)
name
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
@MaxLength(300)
onChainFields
Type : OnChainFieldDTO[]
Decorators :
@IsOptional()
@IsDefined()
@IsArray()
@ArrayUnique()
@ValidateNested()
@Type(undefined)
subscribedBonds
Type : string[]
Decorators :
@ApiProperty({type: 'string'})
@IsArray()
@ArrayNotEmpty()
@ArrayUnique()
@IsOptional()
@IsString({each: true})
subscribedFunds
Type : string[]
Decorators :
@ApiProperty({description: 'The id of funds', isArray: true, type: 'string'})
@IsArray()
@ArrayUnique()
@IsString({each: true})
abaCode
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsOptional()
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:74
accountBic
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:39
accountName
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:45
accountNo
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:33
bankAddress
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:15
bankBic
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:27
bankChaps
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:21
bankName
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:9
currency
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:69
ibanNo
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:51
ultimateAccountNo
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:63
ultimateName
Type : string
Decorators :
@ApiProperty({type: 'string'})
@IsString()
@IsNotEmpty()
@MinLength(3)
Inherited from BankDetailsDTO
Defined in BankDetailsDTO:57
import {
  IsNotEmpty,
  IsString,
  MaxLength,
  MinLength,
  IsObject,
  IsNotEmptyObject,
  IsArray,
  ArrayNotEmpty,
  ArrayUnique,
  IsEnum,
  IsOptional,
  IsDefined,
  ValidateNested,
} from "class-validator";
import { ApiProperty } from "@nestjs/swagger";

import { EndUserRoles } from "src/common/interfaces";
import { Type } from "class-transformer";
import { FileDTO } from "src/shared/dto/file.dto";
import { CmsFieldDTO } from "src/shared/dto/cmsField.dto";
import { BankDetailsDTO } from "src/shared/dto/bank-details.dto";
import { OnChainFieldDTO } from "src/shared/dto/on-chain-field.dto";

export class CreateUserDto extends BankDetailsDTO {
  @ApiProperty({
    description: "The id of funds",
    isArray: true,
    type: "string",
  })
  @IsArray()
  @ArrayUnique()
  @IsString({ each: true })
  subscribedFunds: string[];

  @ApiProperty({ type: "string" })
  @IsArray()
  @ArrayNotEmpty()
  @ArrayUnique()
  @IsOptional()
  @IsString({ each: true })
  subscribedBonds: string[];

  @ApiProperty({ type: "string" })
  @IsString()
  @MinLength(3)
  @MaxLength(300)
  @IsOptional()
  address: string;

  @ApiProperty({ type: "string" })
  @IsString()
  @IsNotEmpty()
  @MinLength(3)
  @MaxLength(300)
  name: string;

  @IsOptional()
  @IsDefined()
  @IsNotEmptyObject()
  @IsObject()
  @ValidateNested()
  @Type(() => FileDTO)
  legalDocuments?: FileDTO;

  @ApiProperty({
    enumName: "End user roles",
    enum: ["investor", "dealer", "fundAdmin"],
  })
  @IsEnum(EndUserRoles)
  endUserRole: EndUserRoles;

  @ApiProperty({ type: "string" })
  @IsString()
  @IsNotEmpty()
  @MinLength(3)
  @MaxLength(300)
  @IsOptional()
  dealerId: string;

  @IsDefined()
  @IsArray()
  @ArrayUnique()
  @ValidateNested()
  @Type(() => CmsFieldDTO)
  cmsFields: CmsFieldDTO[];

  @IsOptional()
  @IsDefined()
  @IsArray()
  @ArrayUnique()
  @ValidateNested()
  @Type(() => OnChainFieldDTO)
  onChainFields: OnChainFieldDTO[];
}

results matching ""

    No results matching ""