mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-28 09:03:53 +00:00

* feat: log store * fix: full text search match query * perf: mongo schema import, Avoid duplicate import
14 lines
383 B
TypeScript
14 lines
383 B
TypeScript
import { connectionMongo, getMongoModel, type Model } from '../../mongo';
|
|
const { Schema, model, models } = connectionMongo;
|
|
|
|
const FileSchema = new Schema({});
|
|
|
|
try {
|
|
FileSchema.index({ 'metadata.teamId': 1 });
|
|
FileSchema.index({ 'metadata.uploadDate': -1 });
|
|
} catch (error) {
|
|
console.log(error);
|
|
}
|
|
|
|
export const MongoFileSchema = getMongoModel('dataset.files', FileSchema);
|