forked from Ynov/ptitspas-ynov-back
user dto correction
This commit is contained in:
parent
39878644e8
commit
c8635c4d09
@ -20,20 +20,21 @@ export class CreateUserDto {
|
||||
|
||||
@ApiProperty({ minLength: 6, example: 'Mon_motdepasse_fort_1234?' })
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@MinLength(6)
|
||||
password: string;
|
||||
|
||||
@ApiProperty({ example: 'Julien' })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(100)
|
||||
prenom?: string;
|
||||
prenom: string;
|
||||
|
||||
@ApiProperty({ example: 'Dupont' })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(100)
|
||||
nom?: string;
|
||||
nom: string;
|
||||
|
||||
@ApiProperty({ enum: GenreType, required: false, default: GenreType.AUTRE })
|
||||
@IsOptional()
|
||||
@ -51,9 +52,9 @@ export class CreateUserDto {
|
||||
|
||||
@ApiProperty({ example: '+33123456789' })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@IsNotEmpty()
|
||||
@MaxLength(20)
|
||||
telephone?: string;
|
||||
telephone: string;
|
||||
|
||||
@ApiProperty({ example: 'Paris', required: false })
|
||||
@IsOptional()
|
||||
@ -69,8 +70,8 @@ export class CreateUserDto {
|
||||
|
||||
@ApiProperty({ example: '10 rue de la paix, 75000 Paris' })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
adresse?: string;
|
||||
@IsNotEmpty()
|
||||
adresse: string;
|
||||
|
||||
@ApiProperty({ example: 'https://example.com/photo.jpg', required: false })
|
||||
@IsOptional()
|
||||
@ -91,4 +92,9 @@ export class CreateUserDto {
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
changement_mdp_obligatoire?: boolean = false;
|
||||
|
||||
@ApiProperty({ example: true })
|
||||
@IsBoolean()
|
||||
@IsNotEmpty()
|
||||
cguAccepted: boolean;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user