add optinal apps
This commit is contained in:
@@ -116,4 +116,73 @@ export class CalculateCostDto {
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
dbStorageSize?: string;
|
||||
|
||||
@ApiProperty({ example: '2Gi', description: 'App storage size for uploads/wp-content' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
appStorageSize?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: false, description: 'Enable Redis caching' })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
enableRedis?: boolean;
|
||||
|
||||
@ApiPropertyOptional({ example: false, description: 'Enable RabbitMQ message broker' })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
enableRabbitmq?: boolean;
|
||||
|
||||
@ApiPropertyOptional({ example: false, description: 'Enable Elasticsearch logging' })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
enableElasticsearch?: boolean;
|
||||
}
|
||||
|
||||
// ─── Renewal & Upgrade DTOs ─────────────────────────────────────────
|
||||
|
||||
export class RenewApplicationDto {
|
||||
@ApiProperty({ enum: BillingCycle, example: 'monthly' })
|
||||
@IsEnum(BillingCycle)
|
||||
cycle: BillingCycle;
|
||||
}
|
||||
|
||||
export class UpgradeResourcesDto {
|
||||
@ApiPropertyOptional({ example: '500m', description: 'New CPU request' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
cpuRequest?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: '1000m', description: 'New CPU limit' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
cpuLimit?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: '256Mi', description: 'New memory request' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
memoryRequest?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: '1Gi', description: 'New memory limit' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
memoryLimit?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 2, description: 'New replica count' })
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(1)
|
||||
replicas?: number;
|
||||
|
||||
@ApiPropertyOptional({ example: '5Gi', description: 'New database storage size' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
dbStorageSize?: string;
|
||||
|
||||
@ApiPropertyOptional({ example: '5Gi', description: 'New app storage size for uploads/wp-content' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
appStorageSize?: string;
|
||||
}
|
||||
|
||||
export class CalculateUpgradeCostDto extends UpgradeResourcesDto {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user