forked from Ynov/ptitspas-ynov-back
create user dto correction
This commit is contained in:
parent
6c39a54b3b
commit
53126dd7e4
@ -10,7 +10,7 @@ import {
|
||||
MinLength,
|
||||
MaxLength,
|
||||
} from 'class-validator';
|
||||
import { RoleType, GenreType, StatutUtilisateurType } from 'src/entities/users.entity';
|
||||
import { RoleType, GenreType, StatutUtilisateurType, SituationFamilialeType } from 'src/entities/users.entity';
|
||||
|
||||
export class CreateUserDto {
|
||||
@ApiProperty({ example: 'sosso.test@example.com' })
|
||||
@ -50,6 +50,11 @@ export class CreateUserDto {
|
||||
@IsEnum(StatutUtilisateurType)
|
||||
statut?: StatutUtilisateurType = StatutUtilisateurType.EN_ATTENTE;
|
||||
|
||||
@ApiProperty({ example: SituationFamilialeType.MARIE, required: false, enum: SituationFamilialeType, default: SituationFamilialeType.MARIE})
|
||||
@IsOptional()
|
||||
@IsEnum(SituationFamilialeType)
|
||||
situation_familiale?: SituationFamilialeType;
|
||||
|
||||
@ApiProperty({ example: '+33123456789' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user