2023-04-01 11:43:45 -05:00
|
|
|
import { IsBoolean, IsNotEmpty, IsOptional, IsUUID } from 'class-validator';
|
|
|
|
|
import { CreateUserDto } from './create-user.dto';
|
|
|
|
|
import { ApiProperty, PartialType } from '@nestjs/swagger';
|
2022-02-03 10:06:44 -06:00
|
|
|
|
2023-04-01 11:43:45 -05:00
|
|
|
export class UpdateUserDto extends PartialType(CreateUserDto) {
|
2022-07-08 21:26:50 -05:00
|
|
|
@IsNotEmpty()
|
2023-04-01 11:43:45 -05:00
|
|
|
@IsUUID('4')
|
|
|
|
|
@ApiProperty({ format: 'uuid' })
|
2022-07-08 21:26:50 -05:00
|
|
|
id!: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
2023-04-01 11:43:45 -05:00
|
|
|
@IsBoolean()
|
2022-07-08 21:26:50 -05:00
|
|
|
isAdmin?: boolean;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
2023-04-01 11:43:45 -05:00
|
|
|
@IsBoolean()
|
2022-07-08 21:26:50 -05:00
|
|
|
shouldChangePassword?: boolean;
|
|
|
|
|
}
|