@spytecgps/nova-orm 1.4.301 → 1.4.303
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/dist/entities/entityTag.d.ts +11 -1
- package/dist/entities/entityTag.js +1 -1
- package/dist/entities/trip.js +1 -1
- package/package.json +1 -1
- package/schema.sql +6 -6
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Order matters: MySQL stores an ENUM as its ordinal, so a new value must be APPENDED
|
|
3
|
+
* last. Appending keeps the change metadata-only (<=255 values fit in 1 byte); inserting
|
|
4
|
+
* mid-list renumbers every later value and forces a full table rebuild.
|
|
5
|
+
*
|
|
6
|
+
* 'Trip' keys on the numeric `nova.trip.id`, which is a `bigint` stored in this table's
|
|
7
|
+
* `int` entityId. That narrowing is deliberate: prod is at ~961M and consumes ~149k
|
|
8
|
+
* ids/day, so `int` holds for ~20 years, and STRICT_TRANS_TABLES makes an eventual
|
|
9
|
+
* overflow a loud error rather than a silent clamp onto another trip's tags.
|
|
10
|
+
*/
|
|
11
|
+
export declare const entityTypeArray: readonly ["Device", "Boundary", "User", "UserInvitation", "ClientAlertConfiguration", "LiveLink", "Trip"];
|
|
2
12
|
export type EntityType = (typeof entityTypeArray)[number];
|
|
3
13
|
export declare class EntityTag {
|
|
4
14
|
id: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("../node_modules/tslib/tslib.es6.js"),e=require("typeorm"),i=require("../utils/boolToNumberTransformer.js");const a=["Device","Boundary","User","UserInvitation","ClientAlertConfiguration","LiveLink"];exports.EntityTag=class EntityTag{id;tagId;clientId;entityType;entityId;metadata;createdBy;createdAt;modifiedBy;modifiedAt;userId;imei;isSecurityGroup},t.__decorate([e.PrimaryGeneratedColumn({type:"int",name:"id"}),t.__metadata("design:type",Number)],exports.EntityTag.prototype,"id",void 0),t.__decorate([e.Column("int",{name:"tagId"}),t.__metadata("design:type",Number)],exports.EntityTag.prototype,"tagId",void 0),t.__decorate([e.Column("int",{name:"clientId"}),t.__metadata("design:type",Number)],exports.EntityTag.prototype,"clientId",void 0),t.__decorate([e.Column("enum",{enum:a,name:"entityType"}),t.__metadata("design:type",String)],exports.EntityTag.prototype,"entityType",void 0),t.__decorate([e.Column("int",{name:"entityId"}),t.__metadata("design:type",Number)],exports.EntityTag.prototype,"entityId",void 0),t.__decorate([e.Column("json",{name:"metadata",nullable:!0}),t.__metadata("design:type",String)],exports.EntityTag.prototype,"metadata",void 0),t.__decorate([e.Column("varchar",{name:"createdBy",length:50}),t.__metadata("design:type",String)],exports.EntityTag.prototype,"createdBy",void 0),t.__decorate([e.Column("datetime",{name:"createdAt"}),t.__metadata("design:type",Date)],exports.EntityTag.prototype,"createdAt",void 0),t.__decorate([e.Column("varchar",{name:"modifiedBy",length:50,nullable:!0}),t.__metadata("design:type",String)],exports.EntityTag.prototype,"modifiedBy",void 0),t.__decorate([e.Column("datetime",{name:"modifiedAt",nullable:!0}),t.__metadata("design:type",Date)],exports.EntityTag.prototype,"modifiedAt",void 0),t.__decorate([e.Column("binary",{name:"userId",length:16,nullable:!0}),t.__metadata("design:type",Buffer)],exports.EntityTag.prototype,"userId",void 0),t.__decorate([e.Column("varchar",{name:"imei",length:15,nullable:!0}),t.__metadata("design:type",String)],exports.EntityTag.prototype,"imei",void 0),t.__decorate([e.Column("tinyint",{name:"isSecurityGroup",width:1,default:()=>"'0'",transformer:new i.BoolToNumberTransformer}),t.__metadata("design:type",Boolean)],exports.EntityTag.prototype,"isSecurityGroup",void 0),exports.EntityTag=t.__decorate([e.Index("ixEntityTagEntityType",["entityType"],{}),e.Index("ixEntityTagTagId",["tagId"],{}),e.Index("ixEntityTagImeiIsSecurityGroupTagId",["imei","isSecurityGroup","tagId"],{}),e.Index("ixEntityTagUserIdIsSecurityGroupTagId",["userId","isSecurityGroup","tagId"],{}),e.Index("ixEntityTagUserIdEntityTypeIsSecurityGroupTagId",["userId","entityType","isSecurityGroup","tagId"],{}),e.Index("ixEntityTagClientIdUserIdEntityTypeIsSecurityGroupTagId",["clientId","userId","entityType","isSecurityGroup","tagId"],{}),e.Index("ixEntityTagEntityIdEntityTypeIsSecurityGroupTagId",["entityId","entityType","isSecurityGroup","tagId"],{}),e.Index("ixEntityTagClientIdEntityIdTagIdEntityType",["clientId","entityId","tagId","entityType"],{unique:!0}),e.Entity("entityTag",{schema:"nova"})],exports.EntityTag),exports.entityTypeArray=a;
|
|
1
|
+
"use strict";var t=require("../node_modules/tslib/tslib.es6.js"),e=require("typeorm"),i=require("../utils/boolToNumberTransformer.js");const a=["Device","Boundary","User","UserInvitation","ClientAlertConfiguration","LiveLink","Trip"];exports.EntityTag=class EntityTag{id;tagId;clientId;entityType;entityId;metadata;createdBy;createdAt;modifiedBy;modifiedAt;userId;imei;isSecurityGroup},t.__decorate([e.PrimaryGeneratedColumn({type:"int",name:"id"}),t.__metadata("design:type",Number)],exports.EntityTag.prototype,"id",void 0),t.__decorate([e.Column("int",{name:"tagId"}),t.__metadata("design:type",Number)],exports.EntityTag.prototype,"tagId",void 0),t.__decorate([e.Column("int",{name:"clientId"}),t.__metadata("design:type",Number)],exports.EntityTag.prototype,"clientId",void 0),t.__decorate([e.Column("enum",{enum:a,name:"entityType"}),t.__metadata("design:type",String)],exports.EntityTag.prototype,"entityType",void 0),t.__decorate([e.Column("int",{name:"entityId"}),t.__metadata("design:type",Number)],exports.EntityTag.prototype,"entityId",void 0),t.__decorate([e.Column("json",{name:"metadata",nullable:!0}),t.__metadata("design:type",String)],exports.EntityTag.prototype,"metadata",void 0),t.__decorate([e.Column("varchar",{name:"createdBy",length:50}),t.__metadata("design:type",String)],exports.EntityTag.prototype,"createdBy",void 0),t.__decorate([e.Column("datetime",{name:"createdAt"}),t.__metadata("design:type",Date)],exports.EntityTag.prototype,"createdAt",void 0),t.__decorate([e.Column("varchar",{name:"modifiedBy",length:50,nullable:!0}),t.__metadata("design:type",String)],exports.EntityTag.prototype,"modifiedBy",void 0),t.__decorate([e.Column("datetime",{name:"modifiedAt",nullable:!0}),t.__metadata("design:type",Date)],exports.EntityTag.prototype,"modifiedAt",void 0),t.__decorate([e.Column("binary",{name:"userId",length:16,nullable:!0}),t.__metadata("design:type",Buffer)],exports.EntityTag.prototype,"userId",void 0),t.__decorate([e.Column("varchar",{name:"imei",length:15,nullable:!0}),t.__metadata("design:type",String)],exports.EntityTag.prototype,"imei",void 0),t.__decorate([e.Column("tinyint",{name:"isSecurityGroup",width:1,default:()=>"'0'",transformer:new i.BoolToNumberTransformer}),t.__metadata("design:type",Boolean)],exports.EntityTag.prototype,"isSecurityGroup",void 0),exports.EntityTag=t.__decorate([e.Index("ixEntityTagEntityType",["entityType"],{}),e.Index("ixEntityTagTagId",["tagId"],{}),e.Index("ixEntityTagImeiIsSecurityGroupTagId",["imei","isSecurityGroup","tagId"],{}),e.Index("ixEntityTagUserIdIsSecurityGroupTagId",["userId","isSecurityGroup","tagId"],{}),e.Index("ixEntityTagUserIdEntityTypeIsSecurityGroupTagId",["userId","entityType","isSecurityGroup","tagId"],{}),e.Index("ixEntityTagClientIdUserIdEntityTypeIsSecurityGroupTagId",["clientId","userId","entityType","isSecurityGroup","tagId"],{}),e.Index("ixEntityTagEntityIdEntityTypeIsSecurityGroupTagId",["entityId","entityType","isSecurityGroup","tagId"],{}),e.Index("ixEntityTagClientIdEntityIdTagIdEntityType",["clientId","entityId","tagId","entityType"],{unique:!0}),e.Entity("entityTag",{schema:"nova"})],exports.EntityTag),exports.entityTypeArray=a;
|
package/dist/entities/trip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/boolToNumberTransformer.js"),r=require("../utils/uuidTransformer.js");exports.Trip=class Trip{id;tripGuid;imei;startDate;endDate;distance;startLat;startLon;endLat;endLon;createdAt;startAddress;endAddress;positionStart;positionEnd;tripCompletionStatusId;clientId;duration;tripType;startMessageId;endMessageId;startSendTimeMessage;endSendTimeMessage;deleted;startOdometer;endOdometer;startPositionId;endPositionId;forceReason;summaryVersion;summaryAt;maxSpeed;avgSpeed;idleSec;polyline;alertCount;alertTypeIds;issueCount;issueTypeIds;speedingCount;maxOverKph;placeIds;endedOffPlace},e.__decorate([t.PrimaryGeneratedColumn({type:"bigint",name:"id"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"id",void 0),e.__decorate([t.Column("binary",{name:"tripGuid",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.Trip.prototype,"tripGuid",void 0),e.__decorate([t.Column("varchar",{name:"imei",length:15}),e.__metadata("design:type",String)],exports.Trip.prototype,"imei",void 0),e.__decorate([t.Column("datetime",{name:"startDate",precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"startDate",void 0),e.__decorate([t.Column("datetime",{name:"endDate",nullable:!0,precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"endDate",void 0),e.__decorate([t.Column("float",{name:"distance"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"distance",void 0),e.__decorate([t.Column("decimal",{name:"startLat",precision:8,scale:6}),e.__metadata("design:type",Number)],exports.Trip.prototype,"startLat",void 0),e.__decorate([t.Column("decimal",{name:"startLon",precision:9,scale:6}),e.__metadata("design:type",Number)],exports.Trip.prototype,"startLon",void 0),e.__decorate([t.Column("decimal",{name:"endLat",nullable:!0,precision:8,scale:6}),e.__metadata("design:type",Number)],exports.Trip.prototype,"endLat",void 0),e.__decorate([t.Column("decimal",{name:"endLon",nullable:!0,precision:9,scale:6}),e.__metadata("design:type",Number)],exports.Trip.prototype,"endLon",void 0),e.__decorate([t.Column("datetime",{name:"createdAt",precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"createdAt",void 0),e.__decorate([t.Column("varchar",{name:"startAddress",length:255}),e.__metadata("design:type",String)],exports.Trip.prototype,"startAddress",void 0),e.__decorate([t.Column("varchar",{name:"endAddress",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.Trip.prototype,"endAddress",void 0),e.__decorate([t.Column("varchar",{name:"positionStart",length:255}),e.__metadata("design:type",String)],exports.Trip.prototype,"positionStart",void 0),e.__decorate([t.Column("varchar",{name:"positionEnd",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.Trip.prototype,"positionEnd",void 0),e.__decorate([t.Column("tinyint",{name:"tripCompletionStatusId",default:()=>"'1'"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"tripCompletionStatusId",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"clientId",void 0),e.__decorate([t.Column("int",{name:"duration"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"duration",void 0),e.__decorate([t.Column("tinyint",{name:"tripType"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"tripType",void 0),e.__decorate([t.Column("binary",{name:"startMessageId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.Trip.prototype,"startMessageId",void 0),e.__decorate([t.Column("binary",{name:"endMessageId",length:16,nullable:!0,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.Trip.prototype,"endMessageId",void 0),e.__decorate([t.Column("datetime",{name:"startSendTimeMessage",nullable:!0,precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"startSendTimeMessage",void 0),e.__decorate([t.Column("datetime",{name:"endSendTimeMessage",nullable:!0,precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"endSendTimeMessage",void 0),e.__decorate([t.Column("tinyint",{name:"deleted",nullable:!0,width:1,transformer:new a.BoolToNumberTransformer,default:()=>"'0'"}),e.__metadata("design:type",Boolean)],exports.Trip.prototype,"deleted",void 0),e.__decorate([t.Column("double",{name:"startOdometer",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"startOdometer",void 0),e.__decorate([t.Column("double",{name:"endOdometer",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"endOdometer",void 0),e.__decorate([t.Column("bigint",{name:"startPositionId",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"startPositionId",void 0),e.__decorate([t.Column("bigint",{name:"endPositionId",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"endPositionId",void 0),e.__decorate([t.Column("varchar",{name:"forceReason",nullable:!0,length:32}),e.__metadata("design:type",String)],exports.Trip.prototype,"forceReason",void 0),e.__decorate([t.Column("tinyint",{name:"summaryVersion",unsigned:!0,default:()=>"'0'"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"summaryVersion",void 0),e.__decorate([t.Column("datetime",{name:"summaryAt",nullable:!0,precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"summaryAt",void 0),e.__decorate([t.Column("float",{name:"maxSpeed",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"maxSpeed",void 0),e.__decorate([t.Column("float",{name:"avgSpeed",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"avgSpeed",void 0),e.__decorate([t.Column("int",{name:"idleSec",nullable:!0,unsigned:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"idleSec",void 0),e.__decorate([t.Column("text",{name:"polyline",nullable:!0}),e.__metadata("design:type",String)],exports.Trip.prototype,"polyline",void 0),e.__decorate([t.Column("smallint",{name:"alertCount",nullable:!0,unsigned:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"alertCount",void 0),e.__decorate([t.Column("
|
|
1
|
+
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/boolToNumberTransformer.js"),r=require("../utils/uuidTransformer.js");exports.Trip=class Trip{id;tripGuid;imei;startDate;endDate;distance;startLat;startLon;endLat;endLon;createdAt;startAddress;endAddress;positionStart;positionEnd;tripCompletionStatusId;clientId;duration;tripType;startMessageId;endMessageId;startSendTimeMessage;endSendTimeMessage;deleted;startOdometer;endOdometer;startPositionId;endPositionId;forceReason;summaryVersion;summaryAt;maxSpeed;avgSpeed;idleSec;polyline;alertCount;alertTypeIds;issueCount;issueTypeIds;speedingCount;maxOverKph;placeIds;endedOffPlace},e.__decorate([t.PrimaryGeneratedColumn({type:"bigint",name:"id"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"id",void 0),e.__decorate([t.Column("binary",{name:"tripGuid",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.Trip.prototype,"tripGuid",void 0),e.__decorate([t.Column("varchar",{name:"imei",length:15}),e.__metadata("design:type",String)],exports.Trip.prototype,"imei",void 0),e.__decorate([t.Column("datetime",{name:"startDate",precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"startDate",void 0),e.__decorate([t.Column("datetime",{name:"endDate",nullable:!0,precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"endDate",void 0),e.__decorate([t.Column("float",{name:"distance"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"distance",void 0),e.__decorate([t.Column("decimal",{name:"startLat",precision:8,scale:6}),e.__metadata("design:type",Number)],exports.Trip.prototype,"startLat",void 0),e.__decorate([t.Column("decimal",{name:"startLon",precision:9,scale:6}),e.__metadata("design:type",Number)],exports.Trip.prototype,"startLon",void 0),e.__decorate([t.Column("decimal",{name:"endLat",nullable:!0,precision:8,scale:6}),e.__metadata("design:type",Number)],exports.Trip.prototype,"endLat",void 0),e.__decorate([t.Column("decimal",{name:"endLon",nullable:!0,precision:9,scale:6}),e.__metadata("design:type",Number)],exports.Trip.prototype,"endLon",void 0),e.__decorate([t.Column("datetime",{name:"createdAt",precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"createdAt",void 0),e.__decorate([t.Column("varchar",{name:"startAddress",length:255}),e.__metadata("design:type",String)],exports.Trip.prototype,"startAddress",void 0),e.__decorate([t.Column("varchar",{name:"endAddress",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.Trip.prototype,"endAddress",void 0),e.__decorate([t.Column("varchar",{name:"positionStart",length:255}),e.__metadata("design:type",String)],exports.Trip.prototype,"positionStart",void 0),e.__decorate([t.Column("varchar",{name:"positionEnd",nullable:!0,length:255}),e.__metadata("design:type",String)],exports.Trip.prototype,"positionEnd",void 0),e.__decorate([t.Column("tinyint",{name:"tripCompletionStatusId",default:()=>"'1'"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"tripCompletionStatusId",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"clientId",void 0),e.__decorate([t.Column("int",{name:"duration"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"duration",void 0),e.__decorate([t.Column("tinyint",{name:"tripType"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"tripType",void 0),e.__decorate([t.Column("binary",{name:"startMessageId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.Trip.prototype,"startMessageId",void 0),e.__decorate([t.Column("binary",{name:"endMessageId",length:16,nullable:!0,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.Trip.prototype,"endMessageId",void 0),e.__decorate([t.Column("datetime",{name:"startSendTimeMessage",nullable:!0,precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"startSendTimeMessage",void 0),e.__decorate([t.Column("datetime",{name:"endSendTimeMessage",nullable:!0,precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"endSendTimeMessage",void 0),e.__decorate([t.Column("tinyint",{name:"deleted",nullable:!0,width:1,transformer:new a.BoolToNumberTransformer,default:()=>"'0'"}),e.__metadata("design:type",Boolean)],exports.Trip.prototype,"deleted",void 0),e.__decorate([t.Column("double",{name:"startOdometer",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"startOdometer",void 0),e.__decorate([t.Column("double",{name:"endOdometer",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"endOdometer",void 0),e.__decorate([t.Column("bigint",{name:"startPositionId",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"startPositionId",void 0),e.__decorate([t.Column("bigint",{name:"endPositionId",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"endPositionId",void 0),e.__decorate([t.Column("varchar",{name:"forceReason",nullable:!0,length:32}),e.__metadata("design:type",String)],exports.Trip.prototype,"forceReason",void 0),e.__decorate([t.Column("tinyint",{name:"summaryVersion",unsigned:!0,default:()=>"'0'"}),e.__metadata("design:type",Number)],exports.Trip.prototype,"summaryVersion",void 0),e.__decorate([t.Column("datetime",{name:"summaryAt",nullable:!0,precision:3}),e.__metadata("design:type",Date)],exports.Trip.prototype,"summaryAt",void 0),e.__decorate([t.Column("float",{name:"maxSpeed",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"maxSpeed",void 0),e.__decorate([t.Column("float",{name:"avgSpeed",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"avgSpeed",void 0),e.__decorate([t.Column("int",{name:"idleSec",nullable:!0,unsigned:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"idleSec",void 0),e.__decorate([t.Column("text",{name:"polyline",nullable:!0}),e.__metadata("design:type",String)],exports.Trip.prototype,"polyline",void 0),e.__decorate([t.Column("smallint",{name:"alertCount",nullable:!0,unsigned:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"alertCount",void 0),e.__decorate([t.Column("text",{name:"alertTypeIds",nullable:!0}),e.__metadata("design:type",String)],exports.Trip.prototype,"alertTypeIds",void 0),e.__decorate([t.Column("smallint",{name:"issueCount",nullable:!0,unsigned:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"issueCount",void 0),e.__decorate([t.Column("text",{name:"issueTypeIds",nullable:!0}),e.__metadata("design:type",String)],exports.Trip.prototype,"issueTypeIds",void 0),e.__decorate([t.Column("smallint",{name:"speedingCount",nullable:!0,unsigned:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"speedingCount",void 0),e.__decorate([t.Column("float",{name:"maxOverKph",nullable:!0}),e.__metadata("design:type",Number)],exports.Trip.prototype,"maxOverKph",void 0),e.__decorate([t.Column("text",{name:"placeIds",nullable:!0}),e.__metadata("design:type",String)],exports.Trip.prototype,"placeIds",void 0),e.__decorate([t.Column("tinyint",{name:"endedOffPlace",nullable:!0,width:1,transformer:new a.BoolToNumberTransformer}),e.__metadata("design:type",Boolean)],exports.Trip.prototype,"endedOffPlace",void 0),exports.Trip=e.__decorate([t.Index("ixuTripGuid",["tripGuid"],{unique:!0}),t.Index("ixTripImei",["imei"],{}),t.Index("ixTripStartDate",["startDate"],{}),t.Index("ixTripEndDate",["endDate"],{}),t.Index("ixCreatedAt",["createdAt"],{}),t.Index("ixTripClientIdImeiStartDate",["clientId","imei","startDate"],{}),t.Entity("trip",{schema:"nova",comment:"Trigger table rebuild 2026-06-24"})],exports.Trip);
|
package/package.json
CHANGED
package/schema.sql
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
-- nova-orm-schema-checksum:
|
|
1
|
+
-- nova-orm-schema-checksum: b388267b80335a8b4596e22edbcbc332
|
|
2
2
|
-- Nova ORM Schema Dump
|
|
3
|
-
-- Generated at: 2026-09-
|
|
3
|
+
-- Generated at: 2026-09-04T15:21:51.826Z
|
|
4
4
|
|
|
5
5
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
6
6
|
|
|
@@ -2193,7 +2193,7 @@ CREATE TABLE `entityTag` (
|
|
|
2193
2193
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
2194
2194
|
`tagId` int NOT NULL,
|
|
2195
2195
|
`clientId` int NOT NULL,
|
|
2196
|
-
`entityType` enum('Device','Boundary','User','UserInvitation','ClientAlertConfiguration','LiveLink') NOT NULL,
|
|
2196
|
+
`entityType` enum('Device','Boundary','User','UserInvitation','ClientAlertConfiguration','LiveLink','Trip') NOT NULL,
|
|
2197
2197
|
`entityId` int NOT NULL,
|
|
2198
2198
|
`metadata` json DEFAULT NULL,
|
|
2199
2199
|
`createdBy` varchar(50) NOT NULL,
|
|
@@ -3808,12 +3808,12 @@ CREATE TABLE `trip` (
|
|
|
3808
3808
|
`idleSec` int unsigned DEFAULT NULL,
|
|
3809
3809
|
`polyline` text,
|
|
3810
3810
|
`alertCount` smallint unsigned DEFAULT NULL,
|
|
3811
|
-
`alertTypeIds`
|
|
3811
|
+
`alertTypeIds` text,
|
|
3812
3812
|
`issueCount` smallint unsigned DEFAULT NULL,
|
|
3813
|
-
`issueTypeIds`
|
|
3813
|
+
`issueTypeIds` text,
|
|
3814
3814
|
`speedingCount` smallint unsigned DEFAULT NULL,
|
|
3815
3815
|
`maxOverKph` float DEFAULT NULL,
|
|
3816
|
-
`placeIds`
|
|
3816
|
+
`placeIds` text,
|
|
3817
3817
|
`endedOffPlace` tinyint(1) DEFAULT NULL,
|
|
3818
3818
|
PRIMARY KEY (`id`),
|
|
3819
3819
|
UNIQUE KEY `ixuTripGuid` (`tripGuid`),
|