tabletcommand-backend-models 5.29.9 → 5.29.10
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/build/models/chart-incident.js +9 -0
- package/build/models/chart-incident.js.map +1 -1
- package/build/models/chart-managed-incident.js +14 -0
- package/build/models/chart-managed-incident.js.map +1 -1
- package/build/models/chart-user.js +5 -0
- package/build/models/chart-user.js.map +1 -1
- package/definitions/models/chart-incident.d.ts +5 -0
- package/definitions/models/chart-incident.d.ts.map +1 -1
- package/definitions/models/chart-managed-incident.d.ts +6 -0
- package/definitions/models/chart-managed-incident.d.ts.map +1 -1
- package/definitions/models/chart-user.d.ts +1 -0
- package/definitions/models/chart-user.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/models/chart-incident.ts +9 -0
- package/src/models/chart-managed-incident.ts +15 -0
- package/src/models/chart-user.ts +5 -0
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ChartIncidentModule = void 0;
|
|
4
4
|
const helpers_1 = require("../helpers");
|
|
5
5
|
const mongooseLeanVirtuals = require("mongoose-lean-virtuals");
|
|
6
|
+
const defaultDate = new Date("2013-01-01T00:26:40.000Z"); // Chart fallback date, before sync
|
|
6
7
|
async function ChartIncidentModule(mongoose) {
|
|
7
8
|
const { Schema, Types } = mongoose;
|
|
8
9
|
const ChartItem = (0, helpers_1.createSchema)(Schema, {
|
|
@@ -14,6 +15,10 @@ async function ChartIncidentModule(mongoose) {
|
|
|
14
15
|
type: Number,
|
|
15
16
|
default: 0,
|
|
16
17
|
},
|
|
18
|
+
dateAt: {
|
|
19
|
+
type: Date,
|
|
20
|
+
default: defaultDate,
|
|
21
|
+
},
|
|
17
22
|
}, {
|
|
18
23
|
_id: false,
|
|
19
24
|
id: false,
|
|
@@ -27,6 +32,10 @@ async function ChartIncidentModule(mongoose) {
|
|
|
27
32
|
type: Number,
|
|
28
33
|
default: 0,
|
|
29
34
|
},
|
|
35
|
+
dateAt: {
|
|
36
|
+
type: Date,
|
|
37
|
+
default: defaultDate,
|
|
38
|
+
},
|
|
30
39
|
departmentId: {
|
|
31
40
|
type: String,
|
|
32
41
|
default: "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-incident.js","sourceRoot":"","sources":["../../src/models/chart-incident.ts"],"names":[],"mappings":";;;AAAA,wCAQoB;AAEpB,+DAA+D;
|
|
1
|
+
{"version":3,"file":"chart-incident.js","sourceRoot":"","sources":["../../src/models/chart-incident.ts"],"names":[],"mappings":";;;AAAA,wCAQoB;AAEpB,+DAA+D;AAC/D,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,mCAAmC;AAEtF,KAAK,UAAU,mBAAmB,CAAC,QAAwB;IAChE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC;IAEnC,MAAM,SAAS,GAAG,IAAA,sBAAY,EAAC,MAAM,EAAE;QACrC,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC;SACX;QACD,MAAM,EAAE;YACN,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,WAAW;SACrB;KACF,EAAE;QACD,GAAG,EAAE,KAAK;QACV,EAAE,EAAE,KAAK;KACV,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,IAAA,sBAAY,EAAC,MAAM,EAAE;QACvC,GAAG,EAAE;YACH,IAAI,EAAE,KAAK,CAAC,QAAQ;YACpB,IAAI,EAAE,IAAI;SACX;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC;SACX;QACD,MAAM,EAAE;YACN,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,WAAW;SACrB;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,IAAI;SACZ;QACD,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC;SACX;QACD,KAAK,EAAE;YACL,IAAI,EAAE,CAAC,SAAS,CAAC;YACjB,OAAO,EAAE,EAAE;SACZ;KACF,EAAE;QACD,UAAU,EAAE,wBAAwB;KACrC,CAAC,CAAC;IACH,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAEpC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE;QACxB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;KAClB,CAAC,CAAC;IAEH,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,0CAA0C;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,WAAW,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAEzC,OAAO,IAAA,qBAAW,EAAC,QAAQ,EAAE,eAAe,EAAE,WAAW,CAAC,CAAC;AAC7D,CAAC;AAlED,kDAkEC;AAID,kBAAe,mBAA6F,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ChartManagedIncidentModule = void 0;
|
|
4
4
|
const helpers_1 = require("../helpers");
|
|
5
5
|
const mongooseLeanVirtuals = require("mongoose-lean-virtuals");
|
|
6
|
+
const defaultDate = new Date("2013-01-01T00:26:40.000Z"); // Chart fallback date, before sync
|
|
6
7
|
async function ChartManagedIncidentModule(mongoose) {
|
|
7
8
|
const { Schema, Types } = mongoose;
|
|
8
9
|
const ChartItem = (0, helpers_1.createSchema)(Schema, {
|
|
@@ -14,6 +15,10 @@ async function ChartManagedIncidentModule(mongoose) {
|
|
|
14
15
|
type: Number,
|
|
15
16
|
default: 0,
|
|
16
17
|
},
|
|
18
|
+
dateAt: {
|
|
19
|
+
type: Date,
|
|
20
|
+
default: defaultDate,
|
|
21
|
+
},
|
|
17
22
|
}, {
|
|
18
23
|
_id: false,
|
|
19
24
|
id: false,
|
|
@@ -27,12 +32,21 @@ async function ChartManagedIncidentModule(mongoose) {
|
|
|
27
32
|
type: Number,
|
|
28
33
|
default: 0,
|
|
29
34
|
},
|
|
35
|
+
dateAt: {
|
|
36
|
+
type: Date,
|
|
37
|
+
default: defaultDate,
|
|
38
|
+
},
|
|
30
39
|
departmentId: {
|
|
31
40
|
type: String,
|
|
32
41
|
default: "",
|
|
33
42
|
required: true,
|
|
34
43
|
index: true,
|
|
35
44
|
},
|
|
45
|
+
userId: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "",
|
|
48
|
+
required: true,
|
|
49
|
+
},
|
|
36
50
|
count: {
|
|
37
51
|
type: Number,
|
|
38
52
|
default: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-managed-incident.js","sourceRoot":"","sources":["../../src/models/chart-managed-incident.ts"],"names":[],"mappings":";;;AAAA,wCAQoB;AAEpB,+DAA+D;
|
|
1
|
+
{"version":3,"file":"chart-managed-incident.js","sourceRoot":"","sources":["../../src/models/chart-managed-incident.ts"],"names":[],"mappings":";;;AAAA,wCAQoB;AAEpB,+DAA+D;AAE/D,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,mCAAmC;AAEtF,KAAK,UAAU,0BAA0B,CAAC,QAAwB;IACvE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC;IAEnC,MAAM,SAAS,GAAG,IAAA,sBAAY,EAAC,MAAM,EAAE;QACrC,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC;SACX;QACD,MAAM,EAAE;YACN,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,WAAW;SACrB;KACF,EAAE;QACD,GAAG,EAAE,KAAK;QACV,EAAE,EAAE,KAAK;KACV,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,IAAA,sBAAY,EAAC,MAAM,EAAE;QACvC,GAAG,EAAE;YACH,IAAI,EAAE,KAAK,CAAC,QAAQ;YACpB,IAAI,EAAE,IAAI;SACX;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC;SACX;QACD,MAAM,EAAE;YACN,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,WAAW;SACrB;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,IAAI;SACZ;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;SACf;QACD,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC;SACX;QACD,KAAK,EAAE;YACL,IAAI,EAAE,CAAC,SAAS,CAAC;YACjB,OAAO,EAAE,EAAE;SACZ;KACF,EAAE;QACD,UAAU,EAAE,gCAAgC;KAC7C,CAAC,CAAC;IACH,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAEpC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE;QACxB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;KAClB,CAAC,CAAC;IAEH,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,0CAA0C;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,WAAW,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAEzC,OAAO,IAAA,qBAAW,EAAC,QAAQ,EAAE,sBAAsB,EAAE,WAAW,CAAC,CAAC;AACpE,CAAC;AAvED,gEAuEC;AAID,kBAAe,0BAAkH,CAAC"}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ChartUserModule = void 0;
|
|
4
4
|
const helpers_1 = require("../helpers");
|
|
5
5
|
const mongooseLeanVirtuals = require("mongoose-lean-virtuals");
|
|
6
|
+
const defaultDate = new Date("2013-01-01T00:26:40.000Z"); // Chart fallback date, before sync
|
|
6
7
|
async function ChartUserModule(mongoose) {
|
|
7
8
|
const { Schema, Types } = mongoose;
|
|
8
9
|
const modelSchema = (0, helpers_1.createSchema)(Schema, {
|
|
@@ -14,6 +15,10 @@ async function ChartUserModule(mongoose) {
|
|
|
14
15
|
type: Number,
|
|
15
16
|
default: 0,
|
|
16
17
|
},
|
|
18
|
+
dateAt: {
|
|
19
|
+
type: Date,
|
|
20
|
+
default: defaultDate,
|
|
21
|
+
},
|
|
17
22
|
departmentId: {
|
|
18
23
|
type: String,
|
|
19
24
|
default: "",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-user.js","sourceRoot":"","sources":["../../src/models/chart-user.ts"],"names":[],"mappings":";;;AAAA,wCAQoB;AAEpB,+DAA+D;
|
|
1
|
+
{"version":3,"file":"chart-user.js","sourceRoot":"","sources":["../../src/models/chart-user.ts"],"names":[],"mappings":";;;AAAA,wCAQoB;AAEpB,+DAA+D;AAC/D,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,mCAAmC;AAEtF,KAAK,UAAU,eAAe,CAAC,QAAwB;IAC5D,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC;IAEnC,MAAM,WAAW,GAAG,IAAA,sBAAY,EAAC,MAAM,EAAE;QACvC,GAAG,EAAE;YACH,IAAI,EAAE,KAAK,CAAC,QAAQ;YACpB,IAAI,EAAE,IAAI;SACX;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC;SACX;QACD,MAAM,EAAE;YACN,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,WAAW;SACrB;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,IAAI;SACZ;QACD,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC;SACX;QACD,KAAK,EAAE;YACL,IAAI,EAAE,CAAC,MAAM,CAAC;YACd,OAAO,EAAE,EAAE;SACZ;KACF,EAAE;QACD,UAAU,EAAE,oBAAoB;KACjC,CAAC,CAAC;IACH,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAEpC,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE;QACxB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;KAClB,CAAC,CAAC;IAEH,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC;QAC5B,0CAA0C;QAC1C,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,WAAW,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAEzC,OAAO,IAAA,qBAAW,EAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;AACzD,CAAC;AAhDD,0CAgDC;AAID,kBAAe,eAAiF,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { MongooseModule, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchema
|
|
|
3
3
|
export declare function ChartIncidentModule(mongoose: MongooseModule): Promise<import("mongoose").Model<import("mongoose").Document & Record<string, unknown> & {
|
|
4
4
|
_id: import("mongoose").Types.ObjectId;
|
|
5
5
|
date: number;
|
|
6
|
+
dateAt: string;
|
|
6
7
|
departmentId: string;
|
|
7
8
|
count: number;
|
|
8
9
|
items: import("../helpers").MongooseInterface<{
|
|
@@ -14,6 +15,10 @@ export declare function ChartIncidentModule(mongoose: MongooseModule): Promise<i
|
|
|
14
15
|
type: NumberConstructor;
|
|
15
16
|
default: number;
|
|
16
17
|
};
|
|
18
|
+
dateAt: {
|
|
19
|
+
type: DateConstructor;
|
|
20
|
+
default: Date;
|
|
21
|
+
};
|
|
17
22
|
}>[];
|
|
18
23
|
}, {}> & {
|
|
19
24
|
__methods?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-incident.d.ts","sourceRoot":"","sources":["../../src/models/chart-incident.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,cAAc,EAId,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-incident.d.ts","sourceRoot":"","sources":["../../src/models/chart-incident.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,cAAc,EAId,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAKpB,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;GAkEjE;AAED,MAAM,WAAW,aAAc,SAAQ,8BAA8B,CAAC,OAAO,mBAAmB,CAAC;CAAI;AACrG,MAAM,WAAW,kBAAmB,SAAQ,+BAA+B,CAAC,aAAa,CAAC;CAAI;;AAC9F,wBAA6G"}
|
|
@@ -3,7 +3,9 @@ import { MongooseModule, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchema
|
|
|
3
3
|
export declare function ChartManagedIncidentModule(mongoose: MongooseModule): Promise<import("mongoose").Model<import("mongoose").Document & Record<string, unknown> & {
|
|
4
4
|
_id: import("mongoose").Types.ObjectId;
|
|
5
5
|
date: number;
|
|
6
|
+
dateAt: string;
|
|
6
7
|
departmentId: string;
|
|
8
|
+
userId: string;
|
|
7
9
|
count: number;
|
|
8
10
|
items: import("../helpers").MongooseInterface<{
|
|
9
11
|
item: {
|
|
@@ -14,6 +16,10 @@ export declare function ChartManagedIncidentModule(mongoose: MongooseModule): Pr
|
|
|
14
16
|
type: NumberConstructor;
|
|
15
17
|
default: number;
|
|
16
18
|
};
|
|
19
|
+
dateAt: {
|
|
20
|
+
type: DateConstructor;
|
|
21
|
+
default: Date;
|
|
22
|
+
};
|
|
17
23
|
}>[];
|
|
18
24
|
}, {}> & {
|
|
19
25
|
__methods?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-managed-incident.d.ts","sourceRoot":"","sources":["../../src/models/chart-managed-incident.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,cAAc,EAId,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-managed-incident.d.ts","sourceRoot":"","sources":["../../src/models/chart-managed-incident.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,cAAc,EAId,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAMpB,wBAAsB,0BAA0B,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;GAuExE;AAED,MAAM,WAAW,oBAAqB,SAAQ,8BAA8B,CAAC,OAAO,0BAA0B,CAAC;CAAI;AACnH,MAAM,WAAW,yBAA0B,SAAQ,+BAA+B,CAAC,oBAAoB,CAAC;CAAI;;AAC5G,wBAAkI"}
|
|
@@ -3,6 +3,7 @@ import { MongooseModule, ItemTypeFromTypeSchemaFunction, ModelTypeFromTypeSchema
|
|
|
3
3
|
export declare function ChartUserModule(mongoose: MongooseModule): Promise<import("mongoose").Model<import("mongoose").Document & Record<string, unknown> & {
|
|
4
4
|
_id: import("mongoose").Types.ObjectId;
|
|
5
5
|
date: number;
|
|
6
|
+
dateAt: string;
|
|
6
7
|
departmentId: string;
|
|
7
8
|
count: number;
|
|
8
9
|
items: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-user.d.ts","sourceRoot":"","sources":["../../src/models/chart-user.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,cAAc,EAId,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-user.d.ts","sourceRoot":"","sources":["../../src/models/chart-user.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,cAAc,EAId,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAKpB,wBAAsB,eAAe,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;GAgD7D;AAED,MAAM,WAAW,SAAU,SAAQ,8BAA8B,CAAC,OAAO,eAAe,CAAC;CAAI;AAC7F,MAAM,WAAW,cAAe,SAAQ,+BAA+B,CAAC,SAAS,CAAC;CAAI;;AACtF,wBAAiG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tabletcommand-backend-models",
|
|
3
|
-
"version": "5.29.
|
|
3
|
+
"version": "5.29.10",
|
|
4
4
|
"description": "Tablet Command Backend Models",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "gulp",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/bluebird": "^3.5.38",
|
|
30
30
|
"@types/chai": "^4.3.4",
|
|
31
|
-
"@types/lodash": "^4.14.
|
|
31
|
+
"@types/lodash": "^4.14.194",
|
|
32
32
|
"@types/mocha": "^10.0.1",
|
|
33
33
|
"@types/mongodb": "^3.6.20",
|
|
34
34
|
"@types/mongoose": "~5.10.5",
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from "../helpers";
|
|
10
10
|
|
|
11
11
|
import * as mongooseLeanVirtuals from "mongoose-lean-virtuals";
|
|
12
|
+
const defaultDate = new Date("2013-01-01T00:26:40.000Z"); // Chart fallback date, before sync
|
|
12
13
|
|
|
13
14
|
export async function ChartIncidentModule(mongoose: MongooseModule) {
|
|
14
15
|
const { Schema, Types } = mongoose;
|
|
@@ -22,6 +23,10 @@ export async function ChartIncidentModule(mongoose: MongooseModule) {
|
|
|
22
23
|
type: Number,
|
|
23
24
|
default: 0,
|
|
24
25
|
},
|
|
26
|
+
dateAt: {
|
|
27
|
+
type: Date,
|
|
28
|
+
default: defaultDate,
|
|
29
|
+
},
|
|
25
30
|
}, {
|
|
26
31
|
_id: false,
|
|
27
32
|
id: false,
|
|
@@ -36,6 +41,10 @@ export async function ChartIncidentModule(mongoose: MongooseModule) {
|
|
|
36
41
|
type: Number,
|
|
37
42
|
default: 0,
|
|
38
43
|
},
|
|
44
|
+
dateAt: {
|
|
45
|
+
type: Date,
|
|
46
|
+
default: defaultDate,
|
|
47
|
+
},
|
|
39
48
|
departmentId: {
|
|
40
49
|
type: String,
|
|
41
50
|
default: "",
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
|
|
11
11
|
import * as mongooseLeanVirtuals from "mongoose-lean-virtuals";
|
|
12
12
|
|
|
13
|
+
const defaultDate = new Date("2013-01-01T00:26:40.000Z"); // Chart fallback date, before sync
|
|
14
|
+
|
|
13
15
|
export async function ChartManagedIncidentModule(mongoose: MongooseModule) {
|
|
14
16
|
const { Schema, Types } = mongoose;
|
|
15
17
|
|
|
@@ -22,6 +24,10 @@ export async function ChartManagedIncidentModule(mongoose: MongooseModule) {
|
|
|
22
24
|
type: Number,
|
|
23
25
|
default: 0,
|
|
24
26
|
},
|
|
27
|
+
dateAt: {
|
|
28
|
+
type: Date,
|
|
29
|
+
default: defaultDate,
|
|
30
|
+
},
|
|
25
31
|
}, {
|
|
26
32
|
_id: false,
|
|
27
33
|
id: false,
|
|
@@ -36,12 +42,21 @@ export async function ChartManagedIncidentModule(mongoose: MongooseModule) {
|
|
|
36
42
|
type: Number,
|
|
37
43
|
default: 0,
|
|
38
44
|
},
|
|
45
|
+
dateAt: {
|
|
46
|
+
type: Date,
|
|
47
|
+
default: defaultDate,
|
|
48
|
+
},
|
|
39
49
|
departmentId: {
|
|
40
50
|
type: String,
|
|
41
51
|
default: "",
|
|
42
52
|
required: true,
|
|
43
53
|
index: true,
|
|
44
54
|
},
|
|
55
|
+
userId: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: "",
|
|
58
|
+
required: true,
|
|
59
|
+
},
|
|
45
60
|
count: {
|
|
46
61
|
type: Number,
|
|
47
62
|
default: 0,
|
package/src/models/chart-user.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from "../helpers";
|
|
10
10
|
|
|
11
11
|
import * as mongooseLeanVirtuals from "mongoose-lean-virtuals";
|
|
12
|
+
const defaultDate = new Date("2013-01-01T00:26:40.000Z"); // Chart fallback date, before sync
|
|
12
13
|
|
|
13
14
|
export async function ChartUserModule(mongoose: MongooseModule) {
|
|
14
15
|
const { Schema, Types } = mongoose;
|
|
@@ -22,6 +23,10 @@ export async function ChartUserModule(mongoose: MongooseModule) {
|
|
|
22
23
|
type: Number,
|
|
23
24
|
default: 0,
|
|
24
25
|
},
|
|
26
|
+
dateAt: {
|
|
27
|
+
type: Date,
|
|
28
|
+
default: defaultDate,
|
|
29
|
+
},
|
|
25
30
|
departmentId: {
|
|
26
31
|
type: String,
|
|
27
32
|
default: "",
|