feat: 重构关卡接口

This commit is contained in:
richarjiang
2026-04-26 17:08:27 +08:00
parent e5d6c3a674
commit 25d196263b
13 changed files with 437 additions and 327 deletions

View File

@@ -1,5 +1,6 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsNumber, IsString, Min } from 'class-validator';
import { IsNotEmpty, IsNumber, Min } from 'class-validator';
import { NextLevelDto } from './next-level.dto';
export class CompleteLevelRequestDto {
@ApiProperty({ description: '通关时长(秒)' })
@@ -18,4 +19,11 @@ export class CompleteLevelResponseDto {
@ApiProperty({ description: '通关时长(秒)' })
timeSpent!: number;
@ApiProperty({
description: '下一个待通关的关卡(全部通关时为 null',
nullable: true,
type: NextLevelDto,
})
nextLevel!: NextLevelDto | null;
}