mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-29 08:12:53 +00:00
Some checks are pending
Document deploy / sync-images (push) Waiting to run
Document deploy / generate-timestamp (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.cn suffix:cn]) (push) Blocked by required conditions
Document deploy / build-images (map[domain:https://fastgpt.io suffix:io]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.cn kube_config:KUBE_CONFIG_CN suffix:cn]) (push) Blocked by required conditions
Document deploy / update-images (map[deployment:fastgpt-docs domain:https://fastgpt.io kube_config:KUBE_CONFIG_IO suffix:io]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / get-vars (push) Waiting to run
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:amd64 runs-on:ubuntu-24.04]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / build-fastgpt-images (map[arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Blocked by required conditions
Build FastGPT images in Personal warehouse / release-fastgpt-images (push) Blocked by required conditions
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
import { connectionMongo, getMongoModel } from '../../../common/mongo';
|
|
const { Schema } = connectionMongo;
|
|
import { type AppVersionSchemaType } from '@fastgpt/global/core/app/version';
|
|
import { AppCollectionName, chatConfigType } from '../schema';
|
|
import { TeamMemberCollectionName } from '@fastgpt/global/support/user/team/constant';
|
|
|
|
export const AppVersionCollectionName = 'app_versions';
|
|
|
|
const AppVersionSchema = new Schema(
|
|
{
|
|
tmbId: {
|
|
type: String,
|
|
ref: TeamMemberCollectionName,
|
|
required: true
|
|
},
|
|
appId: {
|
|
type: Schema.Types.ObjectId,
|
|
ref: AppCollectionName,
|
|
required: true
|
|
},
|
|
time: {
|
|
type: Date,
|
|
default: () => new Date()
|
|
},
|
|
nodes: {
|
|
type: Array,
|
|
default: []
|
|
},
|
|
edges: {
|
|
type: Array,
|
|
default: []
|
|
},
|
|
chatConfig: {
|
|
type: chatConfigType
|
|
},
|
|
isPublish: Boolean,
|
|
versionName: String
|
|
},
|
|
{
|
|
minimize: false
|
|
}
|
|
);
|
|
|
|
AppVersionSchema.index({ appId: 1, _id: -1 });
|
|
|
|
export const MongoAppVersion = getMongoModel<AppVersionSchemaType>(
|
|
AppVersionCollectionName,
|
|
AppVersionSchema
|
|
);
|