NestJS backend with Prisma, Docker Compose for Postgres/Redis, and deploy docs for the production VM.
30 lines
551 B
TypeScript
30 lines
551 B
TypeScript
import { IsEmail, IsIn, IsOptional, IsString, Matches, MinLength } from 'class-validator';
|
|
import { ASSIGNABLE_TEAM_ROLES } from '../../auth/auth.types';
|
|
|
|
export class AddTeamMemberDto {
|
|
@IsString()
|
|
@Matches(/^\+[1-9]\d{6,14}$/)
|
|
cellNumber!: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MinLength(8)
|
|
password?: string;
|
|
|
|
@IsString()
|
|
@MinLength(2)
|
|
firstName!: string;
|
|
|
|
@IsString()
|
|
@MinLength(2)
|
|
lastName!: string;
|
|
|
|
@IsOptional()
|
|
@IsEmail()
|
|
email?: string;
|
|
|
|
@IsString()
|
|
@IsIn([...ASSIGNABLE_TEAM_ROLES])
|
|
roleSlug!: string;
|
|
}
|