Files
backend/src/business-team/dto/add-team-member.dto.ts
T
Ali Reza bb59d5e9ba Initial commit: Meshkee CMS API
NestJS backend with Prisma, Docker Compose for Postgres/Redis, and deploy docs for the production VM.
2026-07-21 17:52:36 +03:30

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;
}