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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user