46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
||
import { NextLevelDto } from '../../level/dto/next-level.dto';
|
||
|
||
export class StaminaInfoDto {
|
||
@ApiProperty({ description: '当前体力值' })
|
||
current!: number;
|
||
|
||
@ApiProperty({ description: '体力值上限' })
|
||
max!: number;
|
||
|
||
@ApiProperty({
|
||
description: '下次恢复时间(ISO 字符串),满体力时为 null',
|
||
nullable: true,
|
||
})
|
||
nextRecoverAt!: string | null;
|
||
}
|
||
|
||
export class UserProfileResponseDto {
|
||
@ApiProperty({ description: '用户 ID' })
|
||
id!: string;
|
||
|
||
@ApiProperty({ description: '用户昵称', nullable: true })
|
||
nickname!: string | null;
|
||
|
||
@ApiProperty({ description: '体力信息' })
|
||
stamina!: StaminaInfoDto;
|
||
}
|
||
|
||
export class GameDataResponseDto {
|
||
@ApiProperty({ description: '用户信息' })
|
||
user!: {
|
||
id: string;
|
||
stamina: StaminaInfoDto;
|
||
};
|
||
|
||
@ApiProperty({ description: '已通关的关卡数量' })
|
||
completedLevelCount!: number;
|
||
|
||
@ApiProperty({
|
||
description: '下一个待通关的关卡(全部通关时为 null)',
|
||
nullable: true,
|
||
type: NextLevelDto,
|
||
})
|
||
nextLevel!: NextLevelDto | null;
|
||
}
|