apps/recallassess/recallassess-api/src/api/client/participant/dto/participant-add.dto.ts
DTO for adding a new participant
Properties |
|
| Optional department |
Type : string
|
Decorators :
@Expose()
|
Type : string
|
Decorators :
@Expose()
|
| first_name |
Type : string
|
Decorators :
@Expose()
|
| last_name |
Type : string
|
Decorators :
@Expose()
|
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;
}