import { IsString, IsNotEmpty, IsBoolean, IsNumber, MinLength } from 'class-validator'; import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; export class UpdateUserDto { @ApiProperty({ example: ' ', description: "User's first name" }) @IsNotEmpty() @IsString() firstName: string; @ApiProperty({ example: ' ', description: "User's last name" }) @IsNotEmpty() @IsString() lastName: string; @ApiProperty({ example: ' ', description: "User's father's name" }) @IsNotEmpty() @IsString() fatherName: string; // --- Personal Details --- @ApiPropertyOptional({ example: true, description: 'Gender: true for male, false for female' }) @IsNotEmpty() @IsBoolean() isMale: boolean; @ApiPropertyOptional({ example: '1234567890', description: 'Unique national code' }) @IsNotEmpty() @MinLength(10) nationalCode: string; @ApiPropertyOptional({ example: '1001', description: 'Employee personal code' }) @IsNotEmpty() @IsString() personalCode: string; // --- Employment Details --- @ApiPropertyOptional({ example: 'قراردادی', description: 'Type of hire (e.g., permanent, temporary)' }) @IsNotEmpty() @IsString() hireType: string; @ApiPropertyOptional({ example: 'اراک', description: 'Primary work location' }) @IsNotEmpty() @IsString() workLocation: string; @ApiPropertyOptional({ example: 5, description: 'Years of work experience' }) @IsNotEmpty() @IsNumber() workExperienceYear: number; }