File
|
Optional
billing_cycle
|
Type : BillingCycle
|
Decorators :
@Expose() @ApiProperty({description: 'Billing cycle for the subscription', enum: BillingCycle, example: undefined, required: false}) @IsOptional() @IsEnum(BillingCycle)
|
|
|
|
license_count
|
Type : number
|
Decorators :
@Expose() @ApiProperty({description: 'Number of licenses to set for the package', example: 80}) @IsInt() @IsPositive()
|
|
|
|
package_id
|
Type : number
|
Decorators :
@Expose() @ApiProperty({description: 'Target package ID to apply', example: 2}) @IsInt() @IsPositive()
|
|
|
import { ApiProperty } from "@nestjs/swagger";
import { IsEnum, IsInt, IsOptional, IsPositive } from "class-validator";
import { BillingCycle } from "@prisma/client";
import { Exclude, Expose } from "class-transformer";
@Exclude()
export class SubscriptionConfirmRequestDto {
@Expose()
@ApiProperty({ description: "Target package ID to apply", example: 2 })
@IsInt()
@IsPositive()
package_id!: number;
@Expose()
@ApiProperty({ description: "Number of licenses to set for the package", example: 80 })
@IsInt()
@IsPositive()
license_count!: number;
@Expose()
@ApiProperty({
description: "Billing cycle for the subscription",
enum: BillingCycle,
example: BillingCycle.QUARTERLY,
required: false,
})
@IsOptional()
@IsEnum(BillingCycle)
billing_cycle?: BillingCycle;
}