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,
|
MinLength,
|
||||||
MaxLength,
|
MaxLength,
|
||||||
} from 'class-validator';
|
} 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 {
|
export class CreateUserDto {
|
||||||
@ApiProperty({ example: 'sosso.test@example.com' })
|
@ApiProperty({ example: 'sosso.test@example.com' })
|
||||||
@ -50,6 +50,11 @@ export class CreateUserDto {
|
|||||||
@IsEnum(StatutUtilisateurType)
|
@IsEnum(StatutUtilisateurType)
|
||||||
statut?: StatutUtilisateurType = StatutUtilisateurType.EN_ATTENTE;
|
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' })
|
@ApiProperty({ example: '+33123456789' })
|
||||||
@IsString()
|
@IsString()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user