mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-08-25 05:42:27 +00:00
16 lines
376 B
TypeScript
16 lines
376 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IGoalStats } from '~/saving-goals/interfaces';
|
|
const ZERO = 0;
|
|
export class GoalsStatsResponseDto {
|
|
@ApiProperty()
|
|
totalTarget: number;
|
|
|
|
@ApiProperty()
|
|
totalSaved: number;
|
|
|
|
constructor(stats: IGoalStats) {
|
|
this.totalTarget = stats.totalTarget || ZERO;
|
|
this.totalSaved = stats.totalSaved || ZERO;
|
|
}
|
|
}
|