Files
plates-server/src/recommendations/dto/recommendation.dto.ts

30 lines
691 B
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';
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[]>;