Files
MemeMind-Server/src/modules/level/dto/level-list.dto.ts
richarjiang e5d6c3a674 fix(level): 默认返回 punchline 和 hint1 线索提示
未通关用户现在可以查看谐音梗说明和第一个线索提示,
hint2/hint3 仍需通关后才显示。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 21:37:13 +08:00

54 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { ApiProperty } from '@nestjs/swagger';
export class LevelListItemDto {
@ApiProperty({ description: '关卡 ID' })
id!: string;
@ApiProperty({ description: '关卡编号' })
level!: number;
@ApiProperty({ description: '图片1 URL' })
image1Url!: string;
@ApiProperty({ description: '图片1 文本说明', nullable: true })
image1Description!: string | null;
@ApiProperty({ description: '图片2 URL' })
image2Url!: string;
@ApiProperty({ description: '图片2 文本说明', nullable: true })
image2Description!: string | null;
@ApiProperty({ description: '答案(仅已通关时返回)', nullable: true })
answer!: string | null;
@ApiProperty({ description: '谐音梗说明(始终返回)', nullable: true })
punchline!: string | null;
@ApiProperty({ description: '线索1始终返回', nullable: true })
hint1!: string | null;
@ApiProperty({ description: '线索2仅已通关时返回', nullable: true })
hint2!: string | null;
@ApiProperty({ description: '线索3仅已通关时返回', nullable: true })
hint3!: string | null;
@ApiProperty({ description: '是否已通关' })
completed!: boolean;
@ApiProperty({
description: '通关时长(秒),未通关时为 null',
nullable: true,
})
timeSpent!: number | null;
}
export class LevelListResponseDto {
@ApiProperty({ type: [LevelListItemDto], description: '关卡列表' })
levels!: LevelListItemDto[];
@ApiProperty({ description: '关卡总数' })
total!: number;
}