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