Files
petitspas/backend/src/routes/user/dto/create_assistante.dto.ts
T
jmartin 33d6e7b0c3 feat: Intégration du backend NestJS depuis YNOV
- Framework: NestJS avec TypeORM
- Authentification: JWT (access + refresh tokens)
- Gestion utilisateurs: CRUD complet avec validation
- Routes: auth, users, parents, assistantes maternelles
- Dockerfile pour conteneurisation
2025-11-24 15:44:07 +01:00

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