update
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { IsOptional, IsString, IsNumber, Min, IsEnum, IsIn } from 'class-validator';
|
||||
import { IsOptional, IsString, IsNumber, Min, IsIn } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { EducationLevel, User } from '../entities/user.entity';
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { User } from '../entities/user.entity';
|
||||
|
||||
// Define the valid sort directions
|
||||
const sortOrderOptions = ['asc', 'desc'] as const;
|
||||
@@ -53,18 +53,6 @@ export class FindUsersDto {
|
||||
@IsString()
|
||||
search?: string;
|
||||
|
||||
/**
|
||||
* Filter by a specific education level.
|
||||
*/
|
||||
@ApiPropertyOptional({
|
||||
description: 'Filter by a specific education level.',
|
||||
enum: EducationLevel, // Use the actual enum
|
||||
example: EducationLevel.bachelor,
|
||||
})
|
||||
@IsOptional()
|
||||
@IsEnum(EducationLevel)
|
||||
education?: EducationLevel;
|
||||
|
||||
/**
|
||||
* The field to sort the results by.
|
||||
* @default "createdAt"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { IsString, IsNotEmpty, IsBoolean, IsNumber, IsEnum, MinLength } from 'class-validator';
|
||||
import { IsString, IsNotEmpty, IsBoolean, IsNumber, MinLength } from 'class-validator';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { EducationLevel } from '../entities/user.entity';
|
||||
|
||||
export class UpdateUserDto {
|
||||
@ApiProperty({ example: ' ', description: "User's first name" })
|
||||
@@ -51,13 +50,4 @@ export class UpdateUserDto {
|
||||
@IsNotEmpty()
|
||||
@IsNumber()
|
||||
workExperienceYear: number;
|
||||
|
||||
@ApiPropertyOptional({
|
||||
enum: EducationLevel,
|
||||
example: EducationLevel.master,
|
||||
description: 'Highest level of education achieved',
|
||||
})
|
||||
@IsNotEmpty()
|
||||
@IsEnum(EducationLevel)
|
||||
education: EducationLevel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user