chore: implenet the external invoice 2

This commit is contained in:
mahyargdz
2025-07-14 12:29:00 +03:30
parent 1794b36758
commit 9d46c4f20b
12 changed files with 409 additions and 21 deletions
@@ -0,0 +1,17 @@
import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty, IsNumber, IsOptional, IsString, Min } from "class-validator";
import { BusinessMessage } from "../../../common/enums/message.enum";
// example: 1073741824, // 1GB
export class PurchaseQuotaDto {
@IsNotEmpty({ message: BusinessMessage.QUOTA_AMOUNT_REQUIRED })
@IsNumber({}, { message: BusinessMessage.QUOTA_AMOUNT_MUST_BE_NUMBER })
@Min(1, { message: BusinessMessage.QUOTA_AMOUNT_MUST_BE_POSITIVE })
@ApiProperty({ description: "Additional quota count to purchase in bytes (1024 * 1024 * 1024 = 1GB)", example: 1073741824 })
quota: number;
@IsOptional()
@IsString({ message: BusinessMessage.PURCHASE_DESCRIPTION_MUST_BE_STRING })
@ApiProperty({ description: "Description for the quota purchase", example: "Additional email storage for business", required: false })
description?: string;
}