30 lines
562 B
TypeScript
30 lines
562 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import {
|
|
IsBoolean,
|
|
IsNotEmpty,
|
|
IsNumber,
|
|
IsString,
|
|
Min,
|
|
} from 'class-validator';
|
|
|
|
export class ReportLevelProgressDto {
|
|
@ApiProperty({ description: '分享码' })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
shareCode!: string;
|
|
|
|
@ApiProperty({ description: '关卡 ID' })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
levelId!: string;
|
|
|
|
@ApiProperty({ description: '是否通过' })
|
|
@IsBoolean()
|
|
passed!: boolean;
|
|
|
|
@ApiProperty({ description: '通关时间(秒)' })
|
|
@IsNumber()
|
|
@Min(0)
|
|
timeSpent!: number;
|
|
}
|