Initial commit: Meshkee CMS API
NestJS backend with Prisma, Docker Compose for Postgres/Redis, and deploy docs for the production VM.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { IsIn, IsString } from 'class-validator';
|
||||
import { ASSIGNABLE_TEAM_ROLES } from '../../auth/auth.types';
|
||||
|
||||
export class UpdateTeamMemberDto {
|
||||
@IsString()
|
||||
@IsIn([...ASSIGNABLE_TEAM_ROLES])
|
||||
roleSlug!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user