30 lines
691 B
TypeScript
30 lines
691 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
||
import { BaseResponseDto } from '../../base.dto';
|
||
|
||
export enum RecommendationType {
|
||
Article = 'article',
|
||
Checkin = 'checkin',
|
||
}
|
||
|
||
export class GetRecommendationsQueryDto {
|
||
// @ApiProperty({ required: false, description: '数量,默认10' })
|
||
// limit?: number = 10;
|
||
}
|
||
|
||
export interface RecommendationCard {
|
||
id: string;
|
||
type: RecommendationType;
|
||
title?: string;
|
||
coverUrl?: string;
|
||
// 若为文章,关联文章ID
|
||
articleId?: string;
|
||
// 若为打卡,提示信息
|
||
subtitle?: string;
|
||
// 其他扩展
|
||
extra?: Record<string, any>;
|
||
}
|
||
|
||
export type GetRecommendationsResponseDto = BaseResponseDto<RecommendationCard[]>;
|
||
|
||
|