Defines a index for this Class which will then be added to the Schema.
Which fields to index (if multiple fields are set, it will be a compound index)
Optional
Options to pass to MongoDB driver's createIndex() function
@index({ article: 1, user: 1 }, { unique: true })class ClassName {} Copy
@index({ article: 1, user: 1 }, { unique: true })class ClassName {}
Defines a index for this Class which will then be added to the Schema.