mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-27 00:17:31 +00:00
4.8.6 fix (#1963)
* feat: log store * fix: full text search match query * perf: mongo schema import, Avoid duplicate import
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { connectionMongo, type Model } from '../../../common/mongo';
|
||||
import { connectionMongo, getMongoModel, type Model } from '../../../common/mongo';
|
||||
const { Schema, model, models } = connectionMongo;
|
||||
import { PromotionRecordSchema as PromotionRecordType } from '@fastgpt/global/support/activity/type.d';
|
||||
|
||||
@@ -29,6 +29,7 @@ const PromotionRecordSchema = new Schema({
|
||||
}
|
||||
});
|
||||
|
||||
export const MongoPromotionRecord: Model<PromotionRecordType> =
|
||||
models['promotionRecord'] || model('promotionRecord', PromotionRecordSchema);
|
||||
MongoPromotionRecord.syncIndexes();
|
||||
export const MongoPromotionRecord = getMongoModel<PromotionRecordType>(
|
||||
'promotionRecord',
|
||||
PromotionRecordSchema
|
||||
);
|
||||
|
Reference in New Issue
Block a user