import { IsEmail, IsNotEmpty, IsOptional, IsString, IsUUID, IsArray } from 'class-validator';

export class CreateUserDto {
  @IsEmail()
  @IsNotEmpty()
  email: string;

  @IsString()
  @IsNotEmpty()
  password: string;

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

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

  @IsUUID()
  roleId: string;

  // Optional list of branch memberships for the user
  @IsArray()
  @IsUUID('all', { each: true })
  @IsOptional()
  branchIds?: string[];
} 
