mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
* New pay (#2484) * remove sub status * feat: new pay mode * fix: ts * limit
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { i18nT } from '../../../../web/i18n/utils';
|
||||
|
||||
export enum SubTypeEnum {
|
||||
standard = 'standard',
|
||||
extraDatasetSize = 'extraDatasetSize',
|
||||
@@ -19,19 +21,6 @@ export const subTypeMap = {
|
||||
}
|
||||
};
|
||||
|
||||
export enum SubStatusEnum {
|
||||
active = 'active',
|
||||
expired = 'expired'
|
||||
}
|
||||
export const subStatusMap = {
|
||||
[SubStatusEnum.active]: {
|
||||
label: 'support.wallet.subscription.status.active'
|
||||
},
|
||||
[SubStatusEnum.expired]: {
|
||||
label: 'support.wallet.subscription.status.canceled'
|
||||
}
|
||||
};
|
||||
|
||||
export enum SubModeEnum {
|
||||
month = 'month',
|
||||
year = 'year'
|
||||
@@ -56,23 +45,28 @@ export enum StandardSubLevelEnum {
|
||||
}
|
||||
export const standardSubLevelMap = {
|
||||
[StandardSubLevelEnum.free]: {
|
||||
label: 'support.wallet.subscription.standardSubLevel.free',
|
||||
desc: 'support.wallet.subscription.standardSubLevel.free desc'
|
||||
label: i18nT('common:support.wallet.subscription.standardSubLevel.free'),
|
||||
desc: i18nT('common:support.wallet.subscription.standardSubLevel.free desc'),
|
||||
weight: 1
|
||||
},
|
||||
[StandardSubLevelEnum.experience]: {
|
||||
label: 'support.wallet.subscription.standardSubLevel.experience',
|
||||
desc: ''
|
||||
label: i18nT('common:support.wallet.subscription.standardSubLevel.experience'),
|
||||
desc: '',
|
||||
weight: 2
|
||||
},
|
||||
[StandardSubLevelEnum.team]: {
|
||||
label: 'support.wallet.subscription.standardSubLevel.team',
|
||||
desc: ''
|
||||
label: i18nT('common:support.wallet.subscription.standardSubLevel.team'),
|
||||
desc: '',
|
||||
weight: 3
|
||||
},
|
||||
[StandardSubLevelEnum.enterprise]: {
|
||||
label: 'support.wallet.subscription.standardSubLevel.enterprise',
|
||||
desc: ''
|
||||
label: i18nT('common:support.wallet.subscription.standardSubLevel.enterprise'),
|
||||
desc: '',
|
||||
weight: 4
|
||||
},
|
||||
[StandardSubLevelEnum.custom]: {
|
||||
label: 'support.wallet.subscription.standardSubLevel.custom',
|
||||
desc: ''
|
||||
label: i18nT('common:support.wallet.subscription.standardSubLevel.custom'),
|
||||
desc: '',
|
||||
weight: 5
|
||||
}
|
||||
};
|
||||
|
9
packages/global/support/wallet/sub/type.d.ts
vendored
9
packages/global/support/wallet/sub/type.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { StandardSubLevelEnum, SubModeEnum, SubStatusEnum, SubTypeEnum } from './constants';
|
||||
import { StandardSubLevelEnum, SubModeEnum, SubTypeEnum } from './constants';
|
||||
|
||||
// Content of plan
|
||||
export type TeamStandardSubPlanItemType = {
|
||||
@@ -36,17 +36,14 @@ export type TeamSubSchema = {
|
||||
_id: string;
|
||||
teamId: string;
|
||||
type: `${SubTypeEnum}`;
|
||||
status: `${SubStatusEnum}`;
|
||||
startTime: Date;
|
||||
expiredTime: Date;
|
||||
price: number;
|
||||
|
||||
currentMode: `${SubModeEnum}`;
|
||||
nextMode: `${SubModeEnum}`;
|
||||
currentSubLevel: `${StandardSubLevelEnum}`;
|
||||
nextSubLevel: `${StandardSubLevelEnum}`;
|
||||
currentSubLevel: StandardSubLevelEnum;
|
||||
nextSubLevel: StandardSubLevelEnum;
|
||||
|
||||
pointPrice: number;
|
||||
totalPoints: number;
|
||||
surplusPoints: number;
|
||||
|
||||
|
Reference in New Issue
Block a user