import { IsDefined, IsNotEmpty, IsObject, IsString, ValidateNested } from "class-validator";
import { Type } from "class-transformer";

export class WindowForUserRoomDto {
  @IsString()
  @IsNotEmpty()
  length: string;

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

  @IsString()
  @IsNotEmpty()
  type: string;
}

export class CreateWindowForUserRoomDto {
  @ValidateNested({ each: true })
  @IsObject({ each: true })
  @IsDefined()
  @Type(() => WindowForUserRoomDto)
  windows: WindowForUserRoomDto[];
}
