mirror of
https://github.com/labring/FastGPT.git
synced 2026-04-26 02:07:28 +08:00
4b4f856e16
* fix: api dataset * Update packages/global/core/chat/type.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
64 lines
1.2 KiB
TypeScript
64 lines
1.2 KiB
TypeScript
import { connectionMongo, getMongoModel } from '../../../common/mongo/index';
|
|
const { Schema } = connectionMongo;
|
|
import type { SystemPluginToolCollectionType } from '@fastgpt/global/core/plugin/tool/type';
|
|
import { UserTagsEnum } from '@fastgpt/global/support/user/type';
|
|
|
|
export const collectionName = 'system_plugin_tools';
|
|
|
|
const SystemToolSchema = new Schema({
|
|
pluginId: {
|
|
// commercial-id
|
|
type: String,
|
|
required: true
|
|
},
|
|
status: {
|
|
type: Number,
|
|
default: 1
|
|
},
|
|
defaultInstalled: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
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,
|
|
promoteTags: {
|
|
type: [String],
|
|
enum: UserTagsEnum.enum
|
|
},
|
|
hideTags: {
|
|
type: [String],
|
|
enum: UserTagsEnum.enum
|
|
},
|
|
|
|
/** @deprecated */
|
|
inputConfig: Array,
|
|
/** @deprecated */
|
|
isActive: Boolean
|
|
});
|
|
|
|
SystemToolSchema.index({ pluginId: 1 });
|
|
|
|
export const MongoSystemTool = getMongoModel<SystemPluginToolCollectionType>(
|
|
collectionName,
|
|
SystemToolSchema
|
|
);
|