Replace billing plans with per-runtime usage pricing catalog.

Store explicit hourly/monthly/yearly rates in pricing_rates and addon_rates, compute deploy costs without cycle conversion, and simplify admin UI and wallet payment to cycle-only.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
keyhan
2026-05-15 18:10:54 +03:30
parent 5239e8aa94
commit 35235fe0fc
15 changed files with 1293 additions and 716 deletions
+36
View File
@@ -197,3 +197,39 @@ export class UpgradeResourcesDto {
export class CalculateUpgradeCostDto extends UpgradeResourcesDto {}
// ─── Platform optional services pricing (Admin) ─────────────────────
export class OptionalServiceCyclePricesDto {
@ApiProperty({ example: 500 })
@IsNumber()
@Min(0)
hourly: number;
@ApiProperty({ example: 50000 })
@IsNumber()
@Min(0)
monthly: number;
@ApiProperty({ example: 500000 })
@IsNumber()
@Min(0)
yearly: number;
}
export class SetOptionalServicesPricingDto {
@ApiProperty({ type: OptionalServiceCyclePricesDto })
@ValidateNested()
@Type(() => OptionalServiceCyclePricesDto)
redis: OptionalServiceCyclePricesDto;
@ApiProperty({ type: OptionalServiceCyclePricesDto })
@ValidateNested()
@Type(() => OptionalServiceCyclePricesDto)
rabbitmq: OptionalServiceCyclePricesDto;
@ApiProperty({ type: OptionalServiceCyclePricesDto })
@ValidateNested()
@Type(() => OptionalServiceCyclePricesDto)
elasticsearch: OptionalServiceCyclePricesDto;
}