17 lines
496 B
TypeScript
17 lines
496 B
TypeScript
import { Schema, getMongoModel } from '../../mongo';
|
|
|
|
const DatasetFileSchema = new Schema({});
|
|
const ChatFileSchema = new Schema({});
|
|
|
|
try {
|
|
DatasetFileSchema.index({ uploadDate: -1 });
|
|
|
|
ChatFileSchema.index({ uploadDate: -1 });
|
|
ChatFileSchema.index({ 'metadata.chatId': 1 });
|
|
} catch (error) {
|
|
console.log(error);
|
|
}
|
|
|
|
export const MongoDatasetFileSchema = getMongoModel('dataset.files', DatasetFileSchema);
|
|
export const MongoChatFileSchema = getMongoModel('chat.files', ChatFileSchema);
|