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:
@@ -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