forked from Ynov/ptitspas-ynov-back
user dto correction
This commit is contained in:
parent
ff1171950b
commit
fa40962c09
@ -27,18 +27,18 @@ export class CreateUserDto {
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@MaxLength(100)
|
||||
first_name?: string;
|
||||
prenom?: string;
|
||||
|
||||
@ApiProperty({ example: 'Dupont' })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@MaxLength(100)
|
||||
last_name?: string;
|
||||
nom?: string;
|
||||
|
||||
@ApiProperty({ enum: GenreType, required: false, default: GenreType.AUTRE })
|
||||
@IsOptional()
|
||||
@IsEnum(GenreType)
|
||||
gender?: GenreType = GenreType.AUTRE;
|
||||
genre?: GenreType = GenreType.AUTRE;
|
||||
|
||||
@ApiProperty({ enum: RoleType })
|
||||
@IsEnum(RoleType)
|
||||
@ -47,31 +47,30 @@ export class CreateUserDto {
|
||||
@ApiProperty({ enum: StatutUtilisateurType, required: false, default: StatutUtilisateurType.EN_ATTENTE })
|
||||
@IsOptional()
|
||||
@IsEnum(StatutUtilisateurType)
|
||||
status?: StatutUtilisateurType = StatutUtilisateurType.EN_ATTENTE;
|
||||
statut?: StatutUtilisateurType = StatutUtilisateurType.EN_ATTENTE;
|
||||
|
||||
@ApiProperty({ example: '+33123456789' })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@MaxLength(20)
|
||||
phone?: string;
|
||||
telephone?: string;
|
||||
|
||||
@ApiProperty({ example: 'Paris', required: false })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(150)
|
||||
city?: string;
|
||||
ville?: string;
|
||||
|
||||
@ApiProperty({ example: '75000', required: false })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(10)
|
||||
postal_code?: string;
|
||||
|
||||
code_postal?: string;
|
||||
|
||||
@ApiProperty({ example: '10 rue de la paix, 75000 Paris' })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
address?: string;
|
||||
adresse?: string;
|
||||
|
||||
@ApiProperty({ example: 'https://example.com/photo.jpg', required: false })
|
||||
@IsOptional()
|
||||
@ -81,15 +80,15 @@ export class CreateUserDto {
|
||||
@ApiProperty({ default: false })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
consent_photo?: boolean = false;
|
||||
consentement_photo?: boolean = false;
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
@IsOptional()
|
||||
@IsDateString({}, { message: 'consent_photo_at doit être une date ISO valide' })
|
||||
consent_photo_at?: string | null;
|
||||
@IsDateString({}, { message: 'date_consentement_photo doit être une date ISO valide' })
|
||||
date_consentement_photo?: string | null;
|
||||
|
||||
@ApiProperty({ default: false })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
must_change_password?: boolean = false;
|
||||
changement_mdp_obligatoire?: boolean = false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user