@managesome/eposmatic-toolkit 0.2.645 → 0.2.646

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.
@@ -42,3 +42,18 @@ export declare const DineInFloorsSchema: Schema<any, import("mongoose").Model<an
42
42
  __v: number;
43
43
  }>;
44
44
  export declare const DINEIN_FLOORS_COLLECTION_NAME = "dinein_floors";
45
+ /**
46
+ * Describes the indexes for `dinein_floors`. Values are Mongo key patterns that
47
+ * can be passed straight to `.hint()`.
48
+ * - `_id`: unique primary key.
49
+ * - `tenant_id__active`: per-tenant floor lookups by active state.
50
+ */
51
+ export declare const DINEIN_FLOORS_COLLECTION_INDEXES: {
52
+ _id: {
53
+ _id: number;
54
+ };
55
+ tenant_id__active: {
56
+ tenant_id: number;
57
+ active: number;
58
+ };
59
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DINEIN_FLOORS_COLLECTION_NAME = exports.DineInFloorsSchema = void 0;
3
+ exports.DINEIN_FLOORS_COLLECTION_INDEXES = exports.DINEIN_FLOORS_COLLECTION_NAME = exports.DineInFloorsSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  exports.DineInFloorsSchema = new mongoose_1.Schema({
6
6
  _id: {
@@ -43,3 +43,16 @@ exports.DineInFloorsSchema = new mongoose_1.Schema({
43
43
  minimize: false,
44
44
  });
45
45
  exports.DINEIN_FLOORS_COLLECTION_NAME = 'dinein_floors';
46
+ /**
47
+ * Describes the indexes for `dinein_floors`. Values are Mongo key patterns that
48
+ * can be passed straight to `.hint()`.
49
+ * - `_id`: unique primary key.
50
+ * - `tenant_id__active`: per-tenant floor lookups by active state.
51
+ */
52
+ exports.DINEIN_FLOORS_COLLECTION_INDEXES = {
53
+ _id: { _id: 1 }, // Unique Index
54
+ tenant_id__active: {
55
+ tenant_id: 1,
56
+ active: 1,
57
+ }, // per-tenant floor lookups by active state
58
+ };
@@ -66,3 +66,23 @@ export declare const DineinTablesSchema: Schema<any, import("mongoose").Model<an
66
66
  __v: number;
67
67
  }>;
68
68
  export declare const DINEIN_TABLES_COLLECTION_NAME = "dinein_tables";
69
+ /**
70
+ * Describes the indexes for `dinein_tables`. Values are Mongo key patterns that
71
+ * can be passed straight to `.hint()`.
72
+ * - `_id`: unique primary key.
73
+ * - `tenant_id__dinein_floor_id`: per-tenant table lookups by dine-in floor.
74
+ * - `tenant_id__order_id`: per-tenant table lookups by order.
75
+ */
76
+ export declare const DINEIN_TABLES_COLLECTION_INDEXES: {
77
+ _id: {
78
+ _id: number;
79
+ };
80
+ tenant_id__dinein_floor_id: {
81
+ tenant_id: number;
82
+ dinein_floor_id: number;
83
+ };
84
+ tenant_id__order_id: {
85
+ tenant_id: number;
86
+ order_id: number;
87
+ };
88
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DINEIN_TABLES_COLLECTION_NAME = exports.DineinTablesSchema = void 0;
3
+ exports.DINEIN_TABLES_COLLECTION_INDEXES = exports.DINEIN_TABLES_COLLECTION_NAME = exports.DineinTablesSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const constants_1 = require("../../constants");
6
6
  exports.DineinTablesSchema = new mongoose_1.Schema({
@@ -80,3 +80,21 @@ exports.DineinTablesSchema = new mongoose_1.Schema({
80
80
  minimize: false,
81
81
  });
82
82
  exports.DINEIN_TABLES_COLLECTION_NAME = 'dinein_tables';
83
+ /**
84
+ * Describes the indexes for `dinein_tables`. Values are Mongo key patterns that
85
+ * can be passed straight to `.hint()`.
86
+ * - `_id`: unique primary key.
87
+ * - `tenant_id__dinein_floor_id`: per-tenant table lookups by dine-in floor.
88
+ * - `tenant_id__order_id`: per-tenant table lookups by order.
89
+ */
90
+ exports.DINEIN_TABLES_COLLECTION_INDEXES = {
91
+ _id: { _id: 1 }, // Unique Index
92
+ tenant_id__dinein_floor_id: {
93
+ tenant_id: 1,
94
+ dinein_floor_id: 1,
95
+ }, // per-tenant table lookups by dine-in floor
96
+ tenant_id__order_id: {
97
+ tenant_id: 1,
98
+ order_id: 1,
99
+ }, // per-tenant table lookups by order
100
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.645",
3
+ "version": "0.2.646",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",