feat(challenges): 新增挑战功能模块及完整接口实现
- 新增挑战列表、详情、加入/退出、进度上报等 REST 接口 - 定义 Challenge / ChallengeParticipant 数据模型与状态枚举 - 提供排行榜查询与用户排名计算 - 包含接口文档与数据库初始化脚本
This commit is contained in:
19
src/challenges/dto/challenge-detail.dto.ts
Normal file
19
src/challenges/dto/challenge-detail.dto.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { ChallengeProgressDto, RankingItemDto } from './challenge-progress.dto';
|
||||
|
||||
export interface ChallengeDetailDto {
|
||||
id: string;
|
||||
title: string;
|
||||
image: string | null;
|
||||
periodLabel: string | null;
|
||||
durationLabel: string;
|
||||
requirementLabel: string;
|
||||
summary: string | null;
|
||||
rankingDescription: string | null;
|
||||
highlightTitle: string;
|
||||
highlightSubtitle: string;
|
||||
ctaLabel: string;
|
||||
participantsCount: number;
|
||||
progress?: ChallengeProgressDto;
|
||||
rankings: RankingItemDto[];
|
||||
userRank?: number;
|
||||
}
|
||||
Reference in New Issue
Block a user