mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-21 03:35:36 +00:00
17 lines
482 B
TypeScript
17 lines
482 B
TypeScript
import { Schema, getMongoModel } from '../../mongo';
|
|
|
|
const DatasetFileSchema = new Schema({
|
|
metadata: Object
|
|
});
|
|
const ChatFileSchema = new Schema({
|
|
metadata: Object
|
|
});
|
|
|
|
DatasetFileSchema.index({ uploadDate: -1 });
|
|
|
|
ChatFileSchema.index({ uploadDate: -1 });
|
|
ChatFileSchema.index({ 'metadata.chatId': 1 });
|
|
|
|
export const MongoDatasetFileSchema = getMongoModel('dataset.files', DatasetFileSchema);
|
|
export const MongoChatFileSchema = getMongoModel('chat.files', ChatFileSchema);
|