import { IsString, IsOptional, IsInt, IsEnum, Min, IsNumber } from 'class-validator';

export class CreateRoomDto {
  @IsString()
  roomNumber: string;

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

  @IsOptional()
  @IsInt()
  floor?: number;

  @IsInt()
  @Min(1)
  capacity: number;

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

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

  @IsOptional()
  @IsNumber()
  monthlyRate?: number;
}

export class UpdateRoomDto {
  @IsOptional()
  @IsString()
  roomNumber?: string;

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

  @IsOptional()
  @IsInt()
  floor?: number;

  @IsOptional()
  @IsInt()
  @Min(1)
  capacity?: number;

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

  @IsOptional()
  @IsEnum(['available', 'full', 'maintenance'])
  status?: string;

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

  @IsOptional()
  @IsNumber()
  monthlyRate?: number;
}
