import {
  IsEmail,
  IsEnum,
  IsOptional,
  IsString,
  IsDateString,
} from "class-validator";

export class CreateUserDto {
  @IsString()
  employee_code: string;

  @IsString()
  first_name: string;

  @IsOptional()
  @IsString()
  last_name?: string;

  @IsEmail()
  email: string;

  @IsEmail()
  personal_email: string;

  @IsOptional()
  @IsString()
  phone?: string;

  @IsOptional()
  @IsString()
  department?: string;

  @IsOptional()
  @IsString()
  designation?: string;

  @IsOptional()
  @IsEnum(["active", "inactive"])
  status?: "active" | "inactive";

  @IsOptional()
  @IsDateString()
  join_date?: Date;

  @IsOptional()
  @IsString()
  exit_date?: Date;

  @IsOptional()
  manager_id?: number;
}
