- Framework: NestJS avec TypeORM - Authentification: JWT (access + refresh tokens) - Gestion utilisateurs: CRUD complet avec validation - Routes: auth, users, parents, assistantes maternelles - Dockerfile pour conteneurisation
57 lines
1.1 KiB
TypeScript
57 lines
1.1 KiB
TypeScript
import { OmitType } from "@nestjs/swagger";
|
|
import { IsBoolean, IsDateString, IsInt, IsNotEmpty, IsOptional, IsString, IsUUID, Length, Matches, Max, Min } from "class-validator";
|
|
import { CreateUserDto } from "./create_user.dto";
|
|
|
|
export class CreateAssistanteDto extends OmitType(CreateUserDto, ['role', 'photo_url', 'consentement_photo'] as const) {
|
|
@IsUUID()
|
|
@IsNotEmpty()
|
|
user_id?: string;
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@Length(1, 50)
|
|
approval_number: string;
|
|
|
|
@Matches(/^\d{15}$/)
|
|
@IsNotEmpty()
|
|
nir: string;
|
|
|
|
@IsInt()
|
|
@Min(1)
|
|
@Max(10)
|
|
@IsNotEmpty()
|
|
max_children: number;
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
photo_url: string;
|
|
|
|
@IsBoolean()
|
|
@IsNotEmpty()
|
|
consentement_photo: boolean;
|
|
|
|
@IsDateString()
|
|
@IsNotEmpty()
|
|
agreement_date: string;
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@Length(1, 100)
|
|
residence_city: string;
|
|
|
|
@IsOptional()
|
|
biography?: string;
|
|
|
|
@IsOptional()
|
|
available?: boolean;
|
|
|
|
@IsOptional()
|
|
years_experience?: number;
|
|
|
|
@IsOptional()
|
|
specialty?: string;
|
|
|
|
@IsOptional()
|
|
places_available?: number;
|
|
}
|