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

/**
 * CreateUserDto — single role per user.
 * Per scope doc: Name, Email, Phone, Role, Status, Password
 */
export class CreateUserDto {
  @IsString()
  @IsNotEmpty()
  name: string;

  @IsEmail()
  @IsNotEmpty()
  email: string;

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

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

  @IsUUID()
  @IsNotEmpty()
  role_id: string;

  @IsBoolean()
  @IsOptional()
  is_active?: boolean;
}
