mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-05 01:02:59 +08:00
add templateId to apps (#5866)
* fix: timeselector ui error * var update node * add templateId to apps
This commit is contained in:
@@ -60,18 +60,14 @@ const AppSchema = new Schema(
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
templateId: String,
|
||||
|
||||
updateTime: {
|
||||
type: Date,
|
||||
default: () => new Date()
|
||||
},
|
||||
|
||||
// role and auth
|
||||
teamTags: {
|
||||
type: [String]
|
||||
},
|
||||
|
||||
// save app(Not publish)
|
||||
// Workflow data
|
||||
modules: {
|
||||
type: Array,
|
||||
default: []
|
||||
@@ -83,7 +79,8 @@ const AppSchema = new Schema(
|
||||
chatConfig: {
|
||||
type: chatConfigType
|
||||
},
|
||||
// plugin config
|
||||
|
||||
// Tool config
|
||||
pluginData: {
|
||||
type: {
|
||||
nodeVersion: String,
|
||||
@@ -108,19 +105,21 @@ const AppSchema = new Schema(
|
||||
type: Date
|
||||
},
|
||||
|
||||
inited: {
|
||||
type: Boolean
|
||||
},
|
||||
inheritPermission: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
|
||||
// Chat setting
|
||||
favourite: Boolean,
|
||||
quick: Boolean,
|
||||
|
||||
// abandoned
|
||||
defaultPermission: Number
|
||||
/** @deprecated */
|
||||
defaultPermission: Number,
|
||||
inited: Boolean,
|
||||
teamTags: {
|
||||
type: [String]
|
||||
}
|
||||
},
|
||||
{
|
||||
minimize: false
|
||||
|
||||
@@ -7,6 +7,8 @@ import {
|
||||
TeamMemberCollectionName
|
||||
} from '@fastgpt/global/support/user/team/constant';
|
||||
import { UsageCollectionName, UsageItemCollectionName } from './constants';
|
||||
import { AppCollectionName } from '../../../core/app/schema';
|
||||
import { DatasetCollectionName } from '../../../core/dataset/schema';
|
||||
|
||||
const UsageSchema = new Schema(
|
||||
{
|
||||
@@ -25,31 +27,30 @@ const UsageSchema = new Schema(
|
||||
enum: Object.values(UsageSourceEnum),
|
||||
required: true
|
||||
},
|
||||
// usage name
|
||||
appName: {
|
||||
// usage name
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
// total points
|
||||
totalPoints: {
|
||||
// total points
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
appId: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'apps',
|
||||
required: false
|
||||
},
|
||||
pluginId: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'plugins',
|
||||
required: false
|
||||
},
|
||||
time: {
|
||||
type: Date,
|
||||
default: () => new Date()
|
||||
},
|
||||
|
||||
appId: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: AppCollectionName
|
||||
},
|
||||
datasetId: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: DatasetCollectionName
|
||||
},
|
||||
|
||||
// @description It will not be used again in the future.
|
||||
list: {
|
||||
type: Array
|
||||
|
||||
Reference in New Issue
Block a user