feat: working on saving goals jounrey for juniors

This commit is contained in:
Abdalhamid Alhamad
2024-12-15 12:44:59 +03:00
parent 24d990592d
commit 4d2f6f57f4
35 changed files with 754 additions and 2 deletions

View File

@ -0,0 +1,15 @@
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;
}
}