crazy-odds-bet-shared 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/models/market.js +2 -1
- package/package.json +1 -1
package/models/market.js
CHANGED
|
@@ -11,6 +11,7 @@ const marketSchema = new Schema(
|
|
|
11
11
|
fixtureId: { type: String, required: true, ref: 'Fixture' },
|
|
12
12
|
marketTemplateId: { type: String, required: true, ref: 'MarketTemplate' },
|
|
13
13
|
marketTemplateName: { type: String, required: true },
|
|
14
|
+
marketTemplateCategory: { type: String, required: true },
|
|
14
15
|
specifiers: {
|
|
15
16
|
type: Schema.Types.Mixed,
|
|
16
17
|
default: {}
|
|
@@ -22,7 +23,7 @@ const marketSchema = new Schema(
|
|
|
22
23
|
// Indexes to speed up lookups by fixture and template
|
|
23
24
|
marketSchema.index({ fixtureId: 1 });
|
|
24
25
|
marketSchema.index({ marketTemplateId: 1 });
|
|
25
|
-
marketSchema.index({ fixtureId: 1, marketTemplateId: 1 });
|
|
26
|
+
marketSchema.index({ fixtureId: 1, marketTemplateId: 1, marketTemplateCategory: 1 });
|
|
26
27
|
|
|
27
28
|
// Static methods
|
|
28
29
|
marketSchema.static('findByFixtureAndMarketTemplate', function (fixtureId, marketTemplateId) {
|