crazy-odds-bet-shared 1.0.3 → 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 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) {
@@ -14,7 +14,7 @@ const marketTemplateSchema = new Schema(
14
14
  category: {
15
15
  type: String,
16
16
  required: true,
17
- enum: ['player-props', 'match-outcome', 'handicaps']
17
+ enum: ['player-props', 'match-props', 'team-props', 'handicaps']
18
18
  },
19
19
 
20
20
  // Standardized outcome types for this market template
package/models/odd.js CHANGED
@@ -12,6 +12,9 @@ const oddSchema = new Schema(
12
12
  bookmakerName: { type: String },
13
13
  fixtureId: { type: String, required: true, ref: 'Fixture' },
14
14
  fixtureName: { type: String },
15
+ fixtureScheduledAt: { type: Date, required: true },
16
+ sportName: { type: String },
17
+ competitionName: { type: String },
15
18
  marketId: { type: String, required: true, ref: 'Market' },
16
19
  marketTemplateName: { type: String },
17
20
  externalMarketId: { type: String },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crazy-odds-bet-shared",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Shared MongoDB models and utilities for odds project",
5
5
  "main": "index.js",
6
6
  "exports": {
package/utils/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  const { logger } = require('./logging/logger.js');
2
2
  const { getLoggerConfig } = require('./logging/config.js');
3
- const { justTest } = require('./test.js');
4
3
 
5
- module.exports = { logger, getLoggerConfig, justTest };
4
+ module.exports = { logger, getLoggerConfig };
package/utils/test.js DELETED
@@ -1,8 +0,0 @@
1
- const { logger } = require("./logging/logger");
2
-
3
- const justTest = () => {
4
- logger.info("just a test log from shared utils test file");
5
- return "crazy-odds-bet-shared is working!";
6
- };
7
-
8
- module.exports = { justTest };