File

apps/recallassess/recallassess-api/src/api/client/participant/dto/participant-add.dto.ts

Description

DTO for adding a new participant

Index

Properties

Properties

Optional department
Type : string
Decorators :
@Expose()
@ApiPropertyOptional({description: 'Department (participant group name)', example: 'Sales Team'})
@IsOptional()
@IsString()
email
Type : string
Decorators :
@Expose()
@ApiProperty({description: 'Email address', example: 'john.smith@company.com'})
@IsNotEmpty()
@IsEmail()
first_name
Type : string
Decorators :
@Expose()
@ApiProperty({description: 'First name of the participant', example: 'John', minLength: 1, maxLength: 100})
@IsNotEmpty()
@IsString()
@MinLength(1)
@MaxLength(100)
last_name
Type : string
Decorators :
@Expose()
@ApiProperty({description: 'Last name of the participant', example: 'Smith', minLength: 1, maxLength: 100})
@IsNotEmpty()
@IsString()
@MinLength(1)
@MaxLength(100)
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { IsEmail, IsNotEmpty, IsOptional, IsString, MaxLength, MinLength } from "class-validator";
import { Exclude, Expose } from "class-transformer";

/**
 * DTO for adding a new participant
 */
@Exclude()
export class AddParticipantDto {
  @Expose()
  @ApiProperty({
    description: "First name of the participant",
    example: "John",
    minLength: 1,
    maxLength: 100,
  })
  @IsNotEmpty()
  @IsString()
  @MinLength(1)
  @MaxLength(100)
  first_name!: string;

  @Expose()
  @ApiProperty({
    description: "Last name of the participant",
    example: "Smith",
    minLength: 1,
    maxLength: 100,
  })
  @IsNotEmpty()
  @IsString()
  @MinLength(1)
  @MaxLength(100)
  last_name!: string;

  @Expose()
  @ApiProperty({
    description: "Email address",
    example: "john.smith@company.com",
  })
  @IsNotEmpty()
  @IsEmail()
  email!: string;

  @Expose()
  @ApiPropertyOptional({
    description: "Department (participant group name)",
    example: "Sales Team",
  })
  @IsOptional()
  @IsString()
  department?: string;
}

results matching ""

    No results matching ""