chore: implenet the external invoice 2
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user