chore: add new logic for the quota

This commit is contained in:
mahyargdz
2025-07-12 09:45:07 +03:30
parent a350f8af5a
commit 344bf1de0a
12 changed files with 169 additions and 39 deletions
@@ -0,0 +1,29 @@
import { ApiProperty } from "@nestjs/swagger";
export class QuotaInfoDto {
@ApiProperty({ description: "Total quota in bytes", example: 134217728 })
total: number;
@ApiProperty({ description: "Used quota in bytes", example: 67108864 })
used: number;
@ApiProperty({ description: "Remaining quota in bytes", example: 67108864 })
remaining: number;
@ApiProperty({ description: "Total quota in MB", example: 128 })
totalInMB: number;
@ApiProperty({ description: "Used quota in MB", example: 64 })
usedInMB: number;
@ApiProperty({ description: "Remaining quota in MB", example: 64 })
remainingInMB: number;
@ApiProperty({ description: "Usage percentage", example: 50 })
usagePercentage: number;
}
export class BusinessQuotaResponseDto {
@ApiProperty({ description: "Business quota information", type: QuotaInfoDto })
quota: QuotaInfoDto;
}