import { IsInt, IsString, Length, Matches, Min } from 'class-validator';

export class ResetRoomDecorPlacementsDto {
  @IsInt({ message: '布局版本必须是整数' })
  @Min(0, { message: '布局版本不能小于0' })
  layout_revision!: number;

  @IsInt({ message: 'mutation版本必须是整数' })
  @Min(1, { message: 'mutation版本必须大于0' })
  mutation_revision!: number;

  @IsString({ message: 'mutation ID必须是字符串' })
  @Length(16, 64, { message: 'mutation ID长度需在16-64字符之间' })
  @Matches(/^[A-Za-z0-9_-]+$/, { message: 'mutation ID格式不正确' })
  mutation_id!: string;
}
