Files
FastGPT/packages/service/core/plugin/tool/systemToolSchema.ts
T
Archer 4b4f856e16 fix: api dataset (#6551)
* 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>
2026-03-12 20:51:00 +08:00

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
);