yeawood_consts 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +35 -0
  2. package/package.json +12 -0
package/index.js ADDED
@@ -0,0 +1,35 @@
1
+ const _ = require('lodash')
2
+
3
+ // MongoDB事务参数
4
+ exports.TRANSACTION_OPTIONS = (options = {}) =>
5
+ _.extend(
6
+ {
7
+ readPreference: 'primary',
8
+ readConcern: { level: 'local' },
9
+ writeConcern: { w: 'majority' },
10
+ maxCommitTimeMS: 1000
11
+ },
12
+ options
13
+ )
14
+ // 函数计算和缓存、数据库的关系
15
+ exports.CACHE_DBS = {
16
+ STABLE: 0,
17
+ LATEST: 1
18
+ }
19
+ exports.STORAGE_DBS = {
20
+ STABLE: 'yeawood',
21
+ LATEST: 'yeawood_dev'
22
+ }
23
+
24
+ exports.CEE_ORDER_TYPES = []
25
+
26
+ exports.CEE_BID_STATE_PREVIEWING = 0
27
+ exports.CEE_BID_STATE_PREVIEWED = 1
28
+ exports.CEE_BID_STATE_QUOTING = 2
29
+ exports.CEE_BID_STATE_QUOTED = 3
30
+ exports.CEE_BID_STATES = [
31
+ { label: '开启预览', color: 'success', value: this.CEE_BID_STATE_PREVIEWING },
32
+ { label: '预览结束', color: 'default', value: this.CEE_BID_STATE_PREVIEWED },
33
+ { label: '投标开始', color: 'warning', value: this.CEE_BID_STATE_QUOTING },
34
+ { label: '投标结束', color: 'default', value: this.CEE_BID_STATE_QUOTED }
35
+ ]
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "yeawood_consts",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {},
7
+ "author": "",
8
+ "license": "ISC",
9
+ "dependencies": {
10
+ "lodash": "^4.17.21"
11
+ }
12
+ }