chore: new feture for quato

This commit is contained in:
mahyargdz
2025-07-07 16:21:30 +03:30
parent 6565d2ae8b
commit b66114c900
21 changed files with 815 additions and 98 deletions
@@ -0,0 +1,39 @@
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
export class QuotaStatisticsDto {
@ApiProperty({ description: "Total number of email users", example: 150 })
totalUsers: number;
@ApiProperty({ description: "Total quota used by all users in bytes", example: 5368709120 })
totalQuotaUsed: number;
@ApiProperty({ description: "Total quota allowed for all users in bytes", example: 21474836480 })
totalQuotaAllowed: number;
@ApiProperty({ description: "Average quota usage percentage", example: 25.0 })
averageUsagePercent: number;
@ApiPropertyOptional({
description: "Last time quota was synced",
example: "2024-01-15T10:30:00Z",
type: String,
format: "date-time",
})
lastSyncTime: Date | null;
}
export class QuotaInfoDto {
@ApiProperty({ description: "Quota used in bytes", example: 1073741824 })
used: number;
@ApiProperty({ description: "Quota allowed in bytes", example: 5368709120 })
allowed: number;
}
export class SyncResultDto {
@ApiProperty({ description: "Number of successfully synced users", example: 145 })
success: number;
@ApiProperty({ description: "Number of users with sync errors", example: 5 })
errors: number;
}