tango-api-schema 1.0.55 → 1.0.56

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/index.js CHANGED
@@ -33,6 +33,7 @@ import reportParameterModel from "./schema/reportParameter.model.js";
33
33
  import dlZoneModel from "./schema/dlZone.model.js";
34
34
  import eyeTestModel from './schema/eyeTest.model.js';
35
35
  import ticketModel from "./schema/ticket.model.js";
36
+ import activitylogModel from "./schema/activitylog.model.js";
36
37
  export default {
37
38
  clientModel,
38
39
  cameraModel,
@@ -68,5 +69,6 @@ export default {
68
69
  reportParameterModel,
69
70
  dlZoneModel,
70
71
  eyeTestModel,
71
- ticketModel
72
+ ticketModel,
73
+ activitylogModel
72
74
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @name api_activity_logs
3
+ */
4
+
5
+ // NPM Modules
6
+ import { Schema, model } from 'mongoose';
7
+
8
+ // Schema
9
+ const activityLogs = new Schema(
10
+ {
11
+ userId: {
12
+ type: mongoose.Schema.Types.ObjectId,
13
+ required: true,
14
+ },
15
+ userName: {
16
+ type: String,
17
+ },
18
+ Date: {
19
+ type: Date,
20
+ },
21
+ logType: {
22
+ type: String,
23
+ enum: [ 'audit', 'infra', 'queries', 'admin', 'installation', 'report', 'live' ],
24
+ },
25
+ logSubType: {
26
+ type: String,
27
+ enum: [ 'auditStart', 'auditDone', 'auditDraft', 'reAuditPush', 'reTrigger', 'infraInit', 'infraClose', 'installInit', 'installClose', 'roleUpdation',
28
+ 'roleCreation', 'uploadReport', 'generateReport', 'sendReport', 'pendingFromClient', 'pendingFromTango' ],
29
+ },
30
+ logData: {
31
+ type: Object,
32
+ default: {},
33
+ },
34
+ },
35
+ {
36
+ timestamps: true,
37
+ strict: true,
38
+ versionKey: false,
39
+ },
40
+ );
41
+
42
+ export default model( 'activity_logs', activityLogs );