tabletcommand-backend-models 5.28.2 → 5.28.3

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.
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CADIncidentDeltaModule = void 0;
4
+ const helpers_1 = require("../helpers");
5
+ // Temporary collection to incident delta
6
+ async function CADIncidentDeltaModule(mongoose) {
7
+ const { Schema } = mongoose;
8
+ const modelSchema = (0, helpers_1.createSchema)(Schema, {
9
+ departmentId: {
10
+ type: String,
11
+ default: "",
12
+ required: true,
13
+ index: true,
14
+ },
15
+ incidentNumber: {
16
+ type: String,
17
+ default: "",
18
+ required: true,
19
+ },
20
+ createdAt: {
21
+ type: Date,
22
+ default: helpers_1.currentDate,
23
+ },
24
+ toLegacy: {
25
+ type: Object,
26
+ },
27
+ toFlat: {
28
+ type: Object,
29
+ },
30
+ }, {
31
+ collection: "massive_cad_incident_delta",
32
+ });
33
+ return (0, helpers_1.createModel)(mongoose, "CADIncidentDelta", modelSchema);
34
+ }
35
+ exports.CADIncidentDeltaModule = CADIncidentDeltaModule;
36
+ exports.default = CADIncidentDeltaModule;
37
+ //# sourceMappingURL=cad-incident-delta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cad-incident-delta.js","sourceRoot":"","sources":["../../src/models/cad-incident-delta.ts"],"names":[],"mappings":";;;AAAA,wCAQoB;AAEpB,yCAAyC;AAClC,KAAK,UAAU,sBAAsB,CAAC,QAAwB;IACnE,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;IAE5B,MAAM,WAAW,GAAG,IAAA,sBAAY,EAAC,MAAM,EAAE;QACvC,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,IAAI;SACZ;QACD,cAAc,EAAE;YACd,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;SACf;QACD,SAAS,EAAE;YACT,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,qBAAW;SACrB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,MAAM;SACb;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;SACb;KACF,EAAE;QACD,UAAU,EAAE,4BAA4B;KACzC,CAAC,CAAC;IAEH,OAAO,IAAA,qBAAW,EAAC,QAAQ,EAAE,kBAAkB,EAAE,WAAW,CAAC,CAAC;AAChE,CAAC;AA9BD,wDA8BC;AAID,kBAAe,sBAAsG,CAAC"}
@@ -0,0 +1,18 @@
1
+ /// <reference types="mongoose" />
2
+ import { ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchemaFunction, MongooseModule, ReplaceModelReturnType } from "../helpers";
3
+ export declare function CADIncidentDeltaModule(mongoose: MongooseModule): Promise<import("mongoose").Model<import("mongoose").Document & Record<string, unknown> & {
4
+ departmentId: string;
5
+ incidentNumber: string;
6
+ createdAt: string;
7
+ toLegacy: any;
8
+ toFlat: any;
9
+ }, {}> & {
10
+ __methods?: unknown;
11
+ }>;
12
+ export interface CADIncidentDelta extends ItemTypeFromTypeSchemaFunction<typeof CADIncidentDeltaModule> {
13
+ }
14
+ export interface CADIncidentDeltaModel extends ModelTypeFromTypeSchemaFunction<CADIncidentDelta> {
15
+ }
16
+ declare const _default: ReplaceModelReturnType<typeof CADIncidentDeltaModule, CADIncidentDeltaModel>;
17
+ export default _default;
18
+ //# sourceMappingURL=cad-incident-delta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cad-incident-delta.d.ts","sourceRoot":"","sources":["../../src/models/cad-incident-delta.ts"],"names":[],"mappings":";AAAA,OAAO,EAIL,8BAA8B,EAC9B,+BAA+B,EAC/B,cAAc,EACd,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAGpB,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;GA8BpE;AAED,MAAM,WAAW,gBAAiB,SAAQ,8BAA8B,CAAC,OAAO,sBAAsB,CAAC;CAAI;AAC3G,MAAM,WAAW,qBAAsB,SAAQ,+BAA+B,CAAC,gBAAgB,CAAC;CAAI;;AACpG,wBAAsH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabletcommand-backend-models",
3
- "version": "5.28.2",
3
+ "version": "5.28.3",
4
4
  "description": "Tablet Command Backend Models",
5
5
  "scripts": {
6
6
  "test": "gulp",
@@ -19,7 +19,7 @@
19
19
  "bluebird": "^3.7.2",
20
20
  "debug": "^4.3.4",
21
21
  "lodash": "^4.17.21",
22
- "moment-timezone": "^0.5.39",
22
+ "moment-timezone": "^0.5.40",
23
23
  "mongoose": "=5.10.19",
24
24
  "mongoose-lean-virtuals": "^0.7.6",
25
25
  "uuid": "~9.0.0"
@@ -32,8 +32,8 @@
32
32
  "@types/mongodb": "^3.6.20",
33
33
  "@types/mongoose": "~5.10.5",
34
34
  "@types/uuid": "~8.3.4",
35
- "@typescript-eslint/eslint-plugin": "~5.45.1",
36
- "@typescript-eslint/parser": "~5.45.1",
35
+ "@typescript-eslint/eslint-plugin": "~5.46.1",
36
+ "@typescript-eslint/parser": "~5.46.1",
37
37
  "chai": "^4.3.7",
38
38
  "cspell": "^6.17.0",
39
39
  "del": "^6.1.1",
@@ -0,0 +1,46 @@
1
+ import {
2
+ createModel,
3
+ createSchema,
4
+ currentDate,
5
+ ItemTypeFromTypeSchemaFunction,
6
+ ModelTypeFromTypeSchemaFunction,
7
+ MongooseModule,
8
+ ReplaceModelReturnType,
9
+ } from "../helpers";
10
+
11
+ // Temporary collection to incident delta
12
+ export async function CADIncidentDeltaModule(mongoose: MongooseModule) {
13
+ const { Schema } = mongoose;
14
+
15
+ const modelSchema = createSchema(Schema, {
16
+ departmentId: {
17
+ type: String,
18
+ default: "",
19
+ required: true,
20
+ index: true,
21
+ },
22
+ incidentNumber: {
23
+ type: String,
24
+ default: "",
25
+ required: true,
26
+ },
27
+ createdAt: {
28
+ type: Date,
29
+ default: currentDate,
30
+ },
31
+ toLegacy: {
32
+ type: Object,
33
+ },
34
+ toFlat: {
35
+ type: Object,
36
+ },
37
+ }, {
38
+ collection: "massive_cad_incident_delta",
39
+ });
40
+
41
+ return createModel(mongoose, "CADIncidentDelta", modelSchema);
42
+ }
43
+
44
+ export interface CADIncidentDelta extends ItemTypeFromTypeSchemaFunction<typeof CADIncidentDeltaModule> { }
45
+ export interface CADIncidentDeltaModel extends ModelTypeFromTypeSchemaFunction<CADIncidentDelta> { }
46
+ export default CADIncidentDeltaModule as ReplaceModelReturnType<typeof CADIncidentDeltaModule, CADIncidentDeltaModel>;