fix: add state enums to Connection matchingTags, index to TagSuggestion
This commit is contained in:
parent
8112e5ea47
commit
4b6ff19d5f
2 changed files with 4 additions and 2 deletions
|
|
@ -7,8 +7,8 @@ const connectionSchema = new mongoose.Schema({
|
|||
matchingTags: [
|
||||
{
|
||||
tagSlug: String,
|
||||
initiatorState: String,
|
||||
recipientState: String,
|
||||
initiatorState: { type: String, enum: ['help', 'interested', 'seeking'] },
|
||||
recipientState: { type: String, enum: ['help', 'interested', 'seeking'] },
|
||||
},
|
||||
],
|
||||
hiddenBy: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Member' }],
|
||||
|
|
|
|||
|
|
@ -8,4 +8,6 @@ const tagSuggestionSchema = new mongoose.Schema({
|
|||
createdAt: { type: Date, default: Date.now },
|
||||
})
|
||||
|
||||
tagSuggestionSchema.index({ pool: 1, status: 1 })
|
||||
|
||||
export default mongoose.models.TagSuggestion || mongoose.model('TagSuggestion', tagSuggestionSchema)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue