mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
monorepo packages (#344)
This commit is contained in:
1
packages/common/bill/constants.ts
Normal file
1
packages/common/bill/constants.ts
Normal file
@@ -0,0 +1 @@
|
||||
export const PRICE_SCALE = 100000;
|
9
packages/common/bill/index.ts
Normal file
9
packages/common/bill/index.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));
|
||||
};
|
Reference in New Issue
Block a user