forked from labring/FastGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystemPluginSchema.ts
More file actions
46 lines (41 loc) · 882 Bytes
/
systemPluginSchema.ts
File metadata and controls
46 lines (41 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { connectionMongo, getMongoModel } from '../../../common/mongo/index';
const { Schema } = connectionMongo;
import type { SystemPluginConfigSchemaType } from './type';
export const collectionName = 'app_system_plugins';
const SystemPluginSchema = new Schema({
pluginId: {
type: String,
required: true
},
isActive: {
type: Boolean
},
originCost: {
type: Number,
default: 0
},
currentCost: {
type: Number,
default: 0
},
hasTokenFee: {
type: Boolean,
default: false
},
pluginOrder: {
type: Number
},
systemKeyCost: {
type: Number,
default: 0
},
customConfig: Object,
inputListVal: Object,
// @deprecated
inputConfig: Array
});
SystemPluginSchema.index({ pluginId: 1 });
export const MongoSystemPlugin = getMongoModel<SystemPluginConfigSchemaType>(
collectionName,
SystemPluginSchema
);