We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00387d9 commit 094384bCopy full SHA for 094384b
models/feedback/feedback.model.ts
@@ -1,5 +1,7 @@
1
import { Model, model } from 'mongoose';
2
import { FeedbackSchema, feedbackSchema } from './feedback.schema';
3
4
+feedbackSchema.index({ version: 1, authorId: 1 }, { unique: true }); // Unique together
5
+
6
export default model<FeedbackSchema, Model<FeedbackSchema>>('Feedback', feedbackSchema);
7
0 commit comments