forked from Ynov/ptitspas-ynov-back
register dto added
This commit is contained in:
parent
7b79b63101
commit
7cc9071454
12
src/routes/user/dto/register.dto.ts
Normal file
12
src/routes/user/dto/register.dto.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { ApiProperty, OmitType } from '@nestjs/swagger';
|
||||
import { IsEnum, IsOptional } from 'class-validator';
|
||||
import { CreateUserDto } from './create_user.dto';
|
||||
import { RoleType, StatutUtilisateurType } from 'src/entities/users.entity';
|
||||
|
||||
export class RegisterDto extends OmitType(CreateUserDto, ['must_change_password'] as const) {
|
||||
@ApiProperty({ enum: RoleType, default: RoleType.PARENT })
|
||||
@IsEnum(RoleType)
|
||||
role: RoleType = RoleType.PARENT;
|
||||
|
||||
status?: StatutUtilisateurType = StatutUtilisateurType.EN_ATTENTE;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user