mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 20:37:48 +00:00
v4.5.1 (#417)
This commit is contained in:
1
packages/global/common/bill/constants.ts
Normal file
1
packages/global/common/bill/constants.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const PRICE_SCALE = 100000;
|
9
packages/global/common/bill/tools.ts
Normal file
9
packages/global/common/bill/tools.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* bill common */
|
||||
import { PRICE_SCALE } from './constants';
|
||||
|
||||
/**
|
||||
* dataset price / PRICE_SCALE = real price
|
||||
*/
|
||||
export const formatPrice = (val = 0, multiple = 1) => {
|
||||
return Number(((val / PRICE_SCALE) * multiple).toFixed(10));
|
||||
};
|
3
packages/global/common/bill/types/billReq.d.ts
vendored
Normal file
3
packages/global/common/bill/types/billReq.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export type CreateTrainingBillType = {
|
||||
name: string;
|
||||
};
|
Reference in New Issue
Block a user