Files
FastGPT/packages/service/core/app/plugin/systemPluginSchema.ts
Archer 1a294c1fd3 perf: load plugin groups code;perf: system plugin schema;fix: special variables replace;perf: retry cron app job (#3347)
* perf: load plugin groups code

* perf: system plugin schema

* feat: retry cron app job

* fix: special variables replace
2024-12-09 17:18:07 +08:00

44 lines
832 B
TypeScript

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
},
inputConfig: {
type: Array,
default: []
},
originCost: {
type: Number,
default: 0
},
currentCost: {
type: Number,
default: 0
},
hasTokenFee: {
type: Boolean,
default: false
},
pluginOrder: {
type: Number,
default: 0
},
customConfig: Object
});
SystemPluginSchema.index({ pluginId: 1 });
export const MongoSystemPlugin = getMongoModel<SystemPluginConfigSchemaType>(
collectionName,
SystemPluginSchema
);