refactor: price

This commit is contained in:
Tristan Yang
2023-01-09 09:41:58 +08:00
parent b9ba2b523d
commit 77e4edab9b
6 changed files with 36 additions and 20 deletions
+10
View File
@@ -1,3 +1,13 @@
export interface EntityId {
id: number;
}
export type PriceType = "subscription" | "payment";
export type PriceSubscriptionDuration = "month" | "quarter" | "year";
export type Price = {
title: string,
limit: number,
pid: string,
desc: string,
type: PriceType,
sub_dur?: PriceSubscriptionDuration
}
+2 -1
View File
@@ -1,4 +1,5 @@
// call `organization` in backend
import { PriceType } from "./common";
import { User } from "./user";
export interface Server {
@@ -74,7 +75,7 @@ export interface LicenseMetadata {
domain: string | string[];
}
export interface RenewLicense {
mode: "payment" | "subscription",
type: PriceType,
priceId: string;
metadata: LicenseMetadata;
cancel_url: string;