nounou dto correction
This commit is contained in:
parent
240fe6580b
commit
70ae550733
@ -1,8 +1,20 @@
|
|||||||
import { OmitType } from "@nestjs/swagger";
|
import { OmitType } from "@nestjs/swagger";
|
||||||
import { CreateUserDto } from "./create_user.dto";
|
import { CreateUserDto } from "./create_user.dto";
|
||||||
import { IsBoolean, IsDateString, IsInt, IsOptional, IsString, IsUUID, Length, Matches, Max, Min } from "class-validator";
|
import {
|
||||||
|
IsBoolean,
|
||||||
|
IsDateString,
|
||||||
|
IsInt,
|
||||||
|
IsOptional,
|
||||||
|
IsString,
|
||||||
|
IsUUID,
|
||||||
|
Length,
|
||||||
|
Matches,
|
||||||
|
Max,
|
||||||
|
Min
|
||||||
|
} from "class-validator";
|
||||||
|
|
||||||
export class CreateAssistanteDto extends OmitType(CreateUserDto, ['role'] as const) {
|
export class CreateAssistanteDto extends OmitType(CreateUserDto, ['role'] as const) {
|
||||||
|
|
||||||
@IsUUID()
|
@IsUUID()
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
user_id?: string;
|
user_id?: string;
|
||||||
@ -12,25 +24,10 @@ export class CreateAssistanteDto extends OmitType(CreateUserDto, ['role'] as con
|
|||||||
@Length(1, 50)
|
@Length(1, 50)
|
||||||
numero_agrement?: string;
|
numero_agrement?: string;
|
||||||
|
|
||||||
@IsDateString()
|
|
||||||
@IsOptional()
|
|
||||||
date_naissance?: string;
|
|
||||||
|
|
||||||
@IsString()
|
|
||||||
@IsOptional()
|
|
||||||
@Length(1, 100)
|
|
||||||
ville_naissance?: string;
|
|
||||||
|
|
||||||
@IsString()
|
|
||||||
@IsOptional()
|
|
||||||
@Length(2, 2)
|
|
||||||
pays_naissance?: string;
|
|
||||||
|
|
||||||
@Matches(/^\d{15}$/)
|
@Matches(/^\d{15}$/)
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
nir_chiffre?: string;
|
nir_chiffre?: string;
|
||||||
|
|
||||||
|
|
||||||
@IsInt()
|
@IsInt()
|
||||||
@Min(1)
|
@Min(1)
|
||||||
@Max(10)
|
@Max(10)
|
||||||
@ -50,4 +47,22 @@ export class CreateAssistanteDto extends OmitType(CreateUserDto, ['role'] as con
|
|||||||
@Length(1, 100)
|
@Length(1, 100)
|
||||||
ville_residence?: string;
|
ville_residence?: string;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsDateString()
|
||||||
|
date_agrement?: string;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsInt()
|
||||||
|
@Min(0)
|
||||||
|
annee_experience?: number;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
@Length(1, 100)
|
||||||
|
specialite?: string;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsInt()
|
||||||
|
@Min(0)
|
||||||
|
place_disponible?: number;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user