@spytecgps/nova-orm 1.4.295 → 1.4.297
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/job.d.ts +17 -1
- package/dist/entities/job.js +1 -1
- package/dist/entities/trip.d.ts +26 -0
- package/dist/entities/trip.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/schema.sql +16 -2
package/dist/entities/job.d.ts
CHANGED
|
@@ -46,11 +46,19 @@ export interface JobRecipients {
|
|
|
46
46
|
isEnabled?: boolean;
|
|
47
47
|
}>;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* `customer_note` and `operator_note` are the two halves of the customer SMS
|
|
51
|
+
* thread — inbound from the customer's phone, outbound from the dispatcher —
|
|
52
|
+
* and carry the message body in `title`. The rest are job milestones.
|
|
53
|
+
*/
|
|
54
|
+
export type JobTimelineKind = 'now' | 'alert' | 'info' | 'customer_note' | 'operator_note';
|
|
49
55
|
export interface JobTimelineEvent {
|
|
50
56
|
id: string;
|
|
51
57
|
title: string;
|
|
52
58
|
time: string;
|
|
53
|
-
kind?:
|
|
59
|
+
kind?: JobTimelineKind;
|
|
60
|
+
/** Who sent an `operator_note`. Unset on milestones and on customer notes. */
|
|
61
|
+
author?: string;
|
|
54
62
|
}
|
|
55
63
|
/**
|
|
56
64
|
* Const value namespace for {@link JobLifecycle}. Use these instead of inline
|
|
@@ -88,6 +96,14 @@ export declare const JobOutcomeValue: {
|
|
|
88
96
|
readonly Late: "late";
|
|
89
97
|
readonly Early: "early";
|
|
90
98
|
};
|
|
99
|
+
/** Const value namespace for {@link JobTimelineKind}. */
|
|
100
|
+
export declare const JobTimelineKindValue: {
|
|
101
|
+
readonly Now: "now";
|
|
102
|
+
readonly Alert: "alert";
|
|
103
|
+
readonly Info: "info";
|
|
104
|
+
readonly CustomerNote: "customer_note";
|
|
105
|
+
readonly OperatorNote: "operator_note";
|
|
106
|
+
};
|
|
91
107
|
/**
|
|
92
108
|
* V1 rule kinds. The `kind` column on {@link JobRule} is stored as a free-form
|
|
93
109
|
* string (JSON-embedded) so the entity type doesn't constrain it directly; this
|
package/dist/entities/job.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");const o={Upcoming:"Upcoming",AwaitingUpdate:"AwaitingUpdate",AtOrigin:"AtOrigin",InProgress:"InProgress",Arriving:"Arriving",Arrived:"Arrived",Complete:"Complete",Cancelled:"Cancelled"},r=new Set([o.Upcoming,o.AwaitingUpdate,o.AtOrigin,o.InProgress,o.Arriving,o.Arrived]);exports.Job=class Job{id;clientId;imei;name;reference;customerPhone;lifecycle;healthSignals;proofState;outcome;startLat;startLng;startLabel;startDetail;startRadiusM;endLat;endLng;endLabel;endDetail;endRadiusM;scheduledStart;targetArrival;startedAt;firstObservedAt;arrivedAt;completedAt;cancelledAt;pingsInEndZone;lastPositionAt;lastEvaluatedAt;etaArrivalAt;etaUpdatedAt;etaDriveSeconds;etaDistanceMeters;originalEtaDriveSeconds;etaWindowBufferMinutes;rules;timeline;recipients;liveLinkToken;showAttachmentsOnLiveLink;priorMovingFrequency;priorStoppedFrequency;createdBy;createdAt;modifiedBy;modifiedAt;deletedAt;deletedBy},e.__decorate([t.PrimaryGeneratedColumn({type:"int",name:"id"}),e.__metadata("design:type",Number)],exports.Job.prototype,"id",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.Job.prototype,"clientId",void 0),e.__decorate([t.Column("varchar",{name:"imei",length:15}),e.__metadata("design:type",String)],exports.Job.prototype,"imei",void 0),e.__decorate([t.Column("varchar",{name:"name",length:255}),e.__metadata("design:type",String)],exports.Job.prototype,"name",void 0),e.__decorate([t.Column("varchar",{name:"reference",length:255,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"reference",void 0),e.__decorate([t.Column("varchar",{name:"customerPhone",length:20,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"customerPhone",void 0),e.__decorate([t.Column("varchar",{name:"lifecycle",length:20,default:"Upcoming"}),e.__metadata("design:type",String)],exports.Job.prototype,"lifecycle",void 0),e.__decorate([t.Column("json",{name:"healthSignals",nullable:!0}),e.__metadata("design:type",Array)],exports.Job.prototype,"healthSignals",void 0),e.__decorate([t.Column("varchar",{name:"proofState",length:20,default:"NotArrived"}),e.__metadata("design:type",String)],exports.Job.prototype,"proofState",void 0),e.__decorate([t.Column("varchar",{name:"outcome",length:10,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"outcome",void 0),e.__decorate([t.Column("double",{name:"startLat",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"startLat",void 0),e.__decorate([t.Column("double",{name:"startLng",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"startLng",void 0),e.__decorate([t.Column("varchar",{name:"startLabel",length:500,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"startLabel",void 0),e.__decorate([t.Column("varchar",{name:"startDetail",length:500,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"startDetail",void 0),e.__decorate([t.Column("int",{name:"startRadiusM",default:150}),e.__metadata("design:type",Number)],exports.Job.prototype,"startRadiusM",void 0),e.__decorate([t.Column("double",{name:"endLat",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"endLat",void 0),e.__decorate([t.Column("double",{name:"endLng",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"endLng",void 0),e.__decorate([t.Column("varchar",{name:"endLabel",length:500,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"endLabel",void 0),e.__decorate([t.Column("varchar",{name:"endDetail",length:500,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"endDetail",void 0),e.__decorate([t.Column("int",{name:"endRadiusM",default:150}),e.__metadata("design:type",Number)],exports.Job.prototype,"endRadiusM",void 0),e.__decorate([t.Column("datetime",{name:"scheduledStart",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"scheduledStart",void 0),e.__decorate([t.Column("datetime",{name:"targetArrival",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"targetArrival",void 0),e.__decorate([t.Column("datetime",{name:"startedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"startedAt",void 0),e.__decorate([t.Column("datetime",{name:"firstObservedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"firstObservedAt",void 0),e.__decorate([t.Column("datetime",{name:"arrivedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"arrivedAt",void 0),e.__decorate([t.Column("datetime",{name:"completedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"completedAt",void 0),e.__decorate([t.Column("datetime",{name:"cancelledAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"cancelledAt",void 0),e.__decorate([t.Column("int",{name:"pingsInEndZone",default:0}),e.__metadata("design:type",Number)],exports.Job.prototype,"pingsInEndZone",void 0),e.__decorate([t.Column("datetime",{name:"lastPositionAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"lastPositionAt",void 0),e.__decorate([t.Column("datetime",{name:"lastEvaluatedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"lastEvaluatedAt",void 0),e.__decorate([t.Column("datetime",{name:"etaArrivalAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"etaArrivalAt",void 0),e.__decorate([t.Column("datetime",{name:"etaUpdatedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"etaUpdatedAt",void 0),e.__decorate([t.Column("int",{name:"etaDriveSeconds",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"etaDriveSeconds",void 0),e.__decorate([t.Column("int",{name:"etaDistanceMeters",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"etaDistanceMeters",void 0),e.__decorate([t.Column("int",{name:"originalEtaDriveSeconds",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"originalEtaDriveSeconds",void 0),e.__decorate([t.Column("int",{name:"etaWindowBufferMinutes",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"etaWindowBufferMinutes",void 0),e.__decorate([t.Column("json",{name:"rules",nullable:!0}),e.__metadata("design:type",Array)],exports.Job.prototype,"rules",void 0),e.__decorate([t.Column("json",{name:"timeline",nullable:!0}),e.__metadata("design:type",Array)],exports.Job.prototype,"timeline",void 0),e.__decorate([t.Column("json",{name:"recipients",nullable:!0}),e.__metadata("design:type",Object)],exports.Job.prototype,"recipients",void 0),e.__decorate([t.Column("binary",{name:"liveLinkToken",length:16,nullable:!0,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.Job.prototype,"liveLinkToken",void 0),e.__decorate([t.Column("tinyint",{name:"showAttachmentsOnLiveLink",default:0,width:1}),e.__metadata("design:type",Boolean)],exports.Job.prototype,"showAttachmentsOnLiveLink",void 0),e.__decorate([t.Column("int",{name:"priorMovingFrequency",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"priorMovingFrequency",void 0),e.__decorate([t.Column("int",{name:"priorStoppedFrequency",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"priorStoppedFrequency",void 0),e.__decorate([t.Column("binary",{name:"createdBy",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.Job.prototype,"createdBy",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.Job.prototype,"createdAt",void 0),e.__decorate([t.Column("binary",{name:"modifiedBy",length:16,nullable:!0,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.Job.prototype,"modifiedBy",void 0),e.__decorate([t.UpdateDateColumn({name:"modifiedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"modifiedAt",void 0),e.__decorate([t.DeleteDateColumn({name:"deletedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"deletedAt",void 0),e.__decorate([t.Column("binary",{name:"deletedBy",length:16,nullable:!0,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.Job.prototype,"deletedBy",void 0),exports.Job=e.__decorate([t.Index("ixJobClientIdLifecycle",["clientId","lifecycle"],{}),t.Index("ixJobImeiLifecycle",["imei","lifecycle"],{}),t.Index("ixJobClientIdCreatedBy",["clientId","createdBy"],{}),t.Index("uxJobLiveLinkToken",["liveLinkToken"],{unique:!0}),t.Entity("job",{schema:"nova"})],exports.Job),exports.ACTIVE_JOB_LIFECYCLES=r,exports.JobHealthSignalValue={OnTrack:"OnTrack",Delayed:"Delayed",DelayedStart:"DelayedStart",NotReporting:"NotReporting",RuleViolation:"RuleViolation",LowBattery:"LowBattery"},exports.JobLifecycleValue=o,exports.JobOutcomeValue={OnTime:"on_time",Late:"late",Early:"early"},exports.JobProofStateValue={NotArrived:"NotArrived",FirstObserved:"FirstObserved",ArrivalConfirmed:"ArrivalConfirmed",Unknown:"Unknown"},exports.JobRuleKindValue={Stop:"stop",Zone:"zone",Eta:"eta",Window:"window",Speed:"speed",Deviation:"deviation"};
|
|
1
|
+
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");const o={Upcoming:"Upcoming",AwaitingUpdate:"AwaitingUpdate",AtOrigin:"AtOrigin",InProgress:"InProgress",Arriving:"Arriving",Arrived:"Arrived",Complete:"Complete",Cancelled:"Cancelled"},r=new Set([o.Upcoming,o.AwaitingUpdate,o.AtOrigin,o.InProgress,o.Arriving,o.Arrived]);exports.Job=class Job{id;clientId;imei;name;reference;customerPhone;lifecycle;healthSignals;proofState;outcome;startLat;startLng;startLabel;startDetail;startRadiusM;endLat;endLng;endLabel;endDetail;endRadiusM;scheduledStart;targetArrival;startedAt;firstObservedAt;arrivedAt;completedAt;cancelledAt;pingsInEndZone;lastPositionAt;lastEvaluatedAt;etaArrivalAt;etaUpdatedAt;etaDriveSeconds;etaDistanceMeters;originalEtaDriveSeconds;etaWindowBufferMinutes;rules;timeline;recipients;liveLinkToken;showAttachmentsOnLiveLink;priorMovingFrequency;priorStoppedFrequency;createdBy;createdAt;modifiedBy;modifiedAt;deletedAt;deletedBy},e.__decorate([t.PrimaryGeneratedColumn({type:"int",name:"id"}),e.__metadata("design:type",Number)],exports.Job.prototype,"id",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.Job.prototype,"clientId",void 0),e.__decorate([t.Column("varchar",{name:"imei",length:15}),e.__metadata("design:type",String)],exports.Job.prototype,"imei",void 0),e.__decorate([t.Column("varchar",{name:"name",length:255}),e.__metadata("design:type",String)],exports.Job.prototype,"name",void 0),e.__decorate([t.Column("varchar",{name:"reference",length:255,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"reference",void 0),e.__decorate([t.Column("varchar",{name:"customerPhone",length:20,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"customerPhone",void 0),e.__decorate([t.Column("varchar",{name:"lifecycle",length:20,default:"Upcoming"}),e.__metadata("design:type",String)],exports.Job.prototype,"lifecycle",void 0),e.__decorate([t.Column("json",{name:"healthSignals",nullable:!0}),e.__metadata("design:type",Array)],exports.Job.prototype,"healthSignals",void 0),e.__decorate([t.Column("varchar",{name:"proofState",length:20,default:"NotArrived"}),e.__metadata("design:type",String)],exports.Job.prototype,"proofState",void 0),e.__decorate([t.Column("varchar",{name:"outcome",length:10,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"outcome",void 0),e.__decorate([t.Column("double",{name:"startLat",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"startLat",void 0),e.__decorate([t.Column("double",{name:"startLng",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"startLng",void 0),e.__decorate([t.Column("varchar",{name:"startLabel",length:500,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"startLabel",void 0),e.__decorate([t.Column("varchar",{name:"startDetail",length:500,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"startDetail",void 0),e.__decorate([t.Column("int",{name:"startRadiusM",default:150}),e.__metadata("design:type",Number)],exports.Job.prototype,"startRadiusM",void 0),e.__decorate([t.Column("double",{name:"endLat",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"endLat",void 0),e.__decorate([t.Column("double",{name:"endLng",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"endLng",void 0),e.__decorate([t.Column("varchar",{name:"endLabel",length:500,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"endLabel",void 0),e.__decorate([t.Column("varchar",{name:"endDetail",length:500,nullable:!0}),e.__metadata("design:type",String)],exports.Job.prototype,"endDetail",void 0),e.__decorate([t.Column("int",{name:"endRadiusM",default:150}),e.__metadata("design:type",Number)],exports.Job.prototype,"endRadiusM",void 0),e.__decorate([t.Column("datetime",{name:"scheduledStart",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"scheduledStart",void 0),e.__decorate([t.Column("datetime",{name:"targetArrival",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"targetArrival",void 0),e.__decorate([t.Column("datetime",{name:"startedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"startedAt",void 0),e.__decorate([t.Column("datetime",{name:"firstObservedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"firstObservedAt",void 0),e.__decorate([t.Column("datetime",{name:"arrivedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"arrivedAt",void 0),e.__decorate([t.Column("datetime",{name:"completedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"completedAt",void 0),e.__decorate([t.Column("datetime",{name:"cancelledAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"cancelledAt",void 0),e.__decorate([t.Column("int",{name:"pingsInEndZone",default:0}),e.__metadata("design:type",Number)],exports.Job.prototype,"pingsInEndZone",void 0),e.__decorate([t.Column("datetime",{name:"lastPositionAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"lastPositionAt",void 0),e.__decorate([t.Column("datetime",{name:"lastEvaluatedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"lastEvaluatedAt",void 0),e.__decorate([t.Column("datetime",{name:"etaArrivalAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"etaArrivalAt",void 0),e.__decorate([t.Column("datetime",{name:"etaUpdatedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"etaUpdatedAt",void 0),e.__decorate([t.Column("int",{name:"etaDriveSeconds",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"etaDriveSeconds",void 0),e.__decorate([t.Column("int",{name:"etaDistanceMeters",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"etaDistanceMeters",void 0),e.__decorate([t.Column("int",{name:"originalEtaDriveSeconds",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"originalEtaDriveSeconds",void 0),e.__decorate([t.Column("int",{name:"etaWindowBufferMinutes",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"etaWindowBufferMinutes",void 0),e.__decorate([t.Column("json",{name:"rules",nullable:!0}),e.__metadata("design:type",Array)],exports.Job.prototype,"rules",void 0),e.__decorate([t.Column("json",{name:"timeline",nullable:!0}),e.__metadata("design:type",Array)],exports.Job.prototype,"timeline",void 0),e.__decorate([t.Column("json",{name:"recipients",nullable:!0}),e.__metadata("design:type",Object)],exports.Job.prototype,"recipients",void 0),e.__decorate([t.Column("binary",{name:"liveLinkToken",length:16,nullable:!0,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.Job.prototype,"liveLinkToken",void 0),e.__decorate([t.Column("tinyint",{name:"showAttachmentsOnLiveLink",default:0,width:1}),e.__metadata("design:type",Boolean)],exports.Job.prototype,"showAttachmentsOnLiveLink",void 0),e.__decorate([t.Column("int",{name:"priorMovingFrequency",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"priorMovingFrequency",void 0),e.__decorate([t.Column("int",{name:"priorStoppedFrequency",nullable:!0}),e.__metadata("design:type",Number)],exports.Job.prototype,"priorStoppedFrequency",void 0),e.__decorate([t.Column("binary",{name:"createdBy",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.Job.prototype,"createdBy",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.Job.prototype,"createdAt",void 0),e.__decorate([t.Column("binary",{name:"modifiedBy",length:16,nullable:!0,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.Job.prototype,"modifiedBy",void 0),e.__decorate([t.UpdateDateColumn({name:"modifiedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"modifiedAt",void 0),e.__decorate([t.DeleteDateColumn({name:"deletedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.Job.prototype,"deletedAt",void 0),e.__decorate([t.Column("binary",{name:"deletedBy",length:16,nullable:!0,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.Job.prototype,"deletedBy",void 0),exports.Job=e.__decorate([t.Index("ixJobClientIdLifecycle",["clientId","lifecycle"],{}),t.Index("ixJobImeiLifecycle",["imei","lifecycle"],{}),t.Index("ixJobClientIdCreatedBy",["clientId","createdBy"],{}),t.Index("uxJobLiveLinkToken",["liveLinkToken"],{unique:!0}),t.Entity("job",{schema:"nova"})],exports.Job),exports.ACTIVE_JOB_LIFECYCLES=r,exports.JobHealthSignalValue={OnTrack:"OnTrack",Delayed:"Delayed",DelayedStart:"DelayedStart",NotReporting:"NotReporting",RuleViolation:"RuleViolation",LowBattery:"LowBattery"},exports.JobLifecycleValue=o,exports.JobOutcomeValue={OnTime:"on_time",Late:"late",Early:"early"},exports.JobProofStateValue={NotArrived:"NotArrived",FirstObserved:"FirstObserved",ArrivalConfirmed:"ArrivalConfirmed",Unknown:"Unknown"},exports.JobRuleKindValue={Stop:"stop",Zone:"zone",Eta:"eta",Window:"window",Speed:"speed",Deviation:"deviation"},exports.JobTimelineKindValue={Now:"now",Alert:"alert",Info:"info",CustomerNote:"customer_note",OperatorNote:"operator_note"};
|
package/dist/entities/trip.d.ts
CHANGED
|
@@ -37,4 +37,30 @@ export declare class Trip {
|
|
|
37
37
|
* force?" can only be answered from logs, and a stop can never be reclassified.
|
|
38
38
|
*/
|
|
39
39
|
forceReason: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Trip summary fields (see "Engineering Design — Trip Summary Fields").
|
|
42
|
+
* Two producers own disjoint column sets — the trip generator writes the motion
|
|
43
|
+
* fields (maxSpeed..polyline) incrementally on every batch update, an async
|
|
44
|
+
* enrichment consumer writes the context fields (alertCount..endedOffPlace) a few
|
|
45
|
+
* minutes after completion — so neither may ever write the other's columns.
|
|
46
|
+
* summaryVersion is the enrichment LOGIC version (bumped on definition changes,
|
|
47
|
+
* 0 = never enriched), not a per-write counter; summaryAt is the last enrichment
|
|
48
|
+
* write. Speeds are km/h. The *Ids columns are comma-delimited sets with leading
|
|
49
|
+
* and trailing delimiters, e.g. ',1,39,'. endedOffPlace is tri-state: NULL = not
|
|
50
|
+
* yet enriched, 0/1 = end coordinate inside/outside every saved place.
|
|
51
|
+
*/
|
|
52
|
+
summaryVersion: number;
|
|
53
|
+
summaryAt: Date | null;
|
|
54
|
+
maxSpeed: number | null;
|
|
55
|
+
avgSpeed: number | null;
|
|
56
|
+
idleSec: number | null;
|
|
57
|
+
polyline: string | null;
|
|
58
|
+
alertCount: number | null;
|
|
59
|
+
alertTypeIds: string | null;
|
|
60
|
+
issueCount: number | null;
|
|
61
|
+
issueTypeIds: string | null;
|
|
62
|
+
speedingCount: number | null;
|
|
63
|
+
maxOverKph: number | null;
|
|
64
|
+
placeIds: string | null;
|
|
65
|
+
endedOffPlace: boolean | null;
|
|
40
66
|
}
|
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},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),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);
|
|
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("varchar",{name:"alertTypeIds",nullable:!0,length:128}),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("varchar",{name:"issueTypeIds",nullable:!0,length:128}),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("varchar",{name:"placeIds",nullable:!0,length:255}),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/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Repository } from 'typeorm';
|
|
2
2
|
import * as Cache from './cache';
|
|
3
3
|
import * as Entities from './entities';
|
|
4
|
-
import { ACTIVE_JOB_LIFECYCLES, type JobHealthSignal, JobHealthSignalValue, type JobLifecycle, JobLifecycleValue, type JobOutcome, JobOutcomeValue, type JobProofState, JobProofStateValue, type JobRecipientChannels, type JobRecipients, type JobRule, type JobRuleKind, JobRuleKindValue, type JobTimelineEvent } from './entities/job';
|
|
4
|
+
import { ACTIVE_JOB_LIFECYCLES, type JobHealthSignal, JobHealthSignalValue, type JobLifecycle, JobLifecycleValue, type JobOutcome, JobOutcomeValue, type JobProofState, JobProofStateValue, type JobRecipientChannels, type JobRecipients, type JobRule, type JobRuleKind, JobRuleKindValue, type JobTimelineEvent, type JobTimelineKind, JobTimelineKindValue } from './entities/job';
|
|
5
5
|
import { type JobCustomerLinkDeliveryStatus, JobCustomerLinkDeliveryStatusValue, type JobCustomerLinkStatus, JobCustomerLinkStatusValue } from './entities/jobCustomerLink';
|
|
6
6
|
import { type CustomerPageDefaultJobRules, type CustomerPageSendDefaults } from './entities/jobCustomerPageSetting';
|
|
7
7
|
import { NovaDataSource, NovaDataSourceConfig } from './novaDataSource';
|
|
@@ -28,4 +28,4 @@ declare const Utils: {
|
|
|
28
28
|
addMonthsToNow: (months: number) => Date;
|
|
29
29
|
mapRawEntityToEntity: <T>(rawEntity: any, columnsPrefix?: string) => T;
|
|
30
30
|
};
|
|
31
|
-
export { ACTIVE_JOB_LIFECYCLES, Cache, ConsoleLogger, CustomerPageDefaultJobRules, CustomerPageSendDefaults, Entities, Enums, JobCustomerLinkDeliveryStatus, JobCustomerLinkDeliveryStatusValue, JobCustomerLinkStatus, JobCustomerLinkStatusValue, JobHealthSignal, JobHealthSignalValue, JobLifecycle, JobLifecycleValue, JobOutcome, JobOutcomeValue, JobProofState, JobProofStateValue, JobRecipientChannels, JobRecipients, JobRule, JobRuleKind, JobRuleKindValue, JobTimelineEvent, NovaDataSource, NovaDataSourceConfig, queryTags, Repository, syncSchemaFromDump, SyncSchemaFromDumpConfig, Types, Utils, };
|
|
31
|
+
export { ACTIVE_JOB_LIFECYCLES, Cache, ConsoleLogger, CustomerPageDefaultJobRules, CustomerPageSendDefaults, Entities, Enums, JobCustomerLinkDeliveryStatus, JobCustomerLinkDeliveryStatusValue, JobCustomerLinkStatus, JobCustomerLinkStatusValue, JobHealthSignal, JobHealthSignalValue, JobLifecycle, JobLifecycleValue, JobOutcome, JobOutcomeValue, JobProofState, JobProofStateValue, JobRecipientChannels, JobRecipients, JobRule, JobRuleKind, JobRuleKindValue, JobTimelineEvent, JobTimelineKind, JobTimelineKindValue, NovaDataSource, NovaDataSourceConfig, queryTags, Repository, syncSchemaFromDump, SyncSchemaFromDumpConfig, Types, Utils, };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("typeorm"),t=require("./cache/index.js"),r=require("./entities/index.js"),o=require("./entities/job.js"),a=require("./entities/jobCustomerLink.js"),s=require("./novaDataSource.js"),
|
|
1
|
+
"use strict";var e=require("typeorm"),t=require("./cache/index.js"),r=require("./entities/index.js"),o=require("./entities/job.js"),a=require("./entities/jobCustomerLink.js"),s=require("./novaDataSource.js"),i=require("./syncSchemaFromDump.js"),u=require("./types/index.js"),n=require("./types/enums.js"),l=require("./utils/consoleLogger.js"),m=require("./utils/dateTool.js"),y=require("./utils/mapRawEntityToEntity.js"),p=require("./utils/paramsValidators.js"),g=require("./utils/parsingTools.js"),d=require("./utils/queryTags.js"),b=require("./utils/randomizer.js"),c=require("./utils/uuidHelpers.js");const x={uuidStringToBinaryBuffer:c.uuidStringToBinaryBuffer,binaryBufferToUuidString:c.binaryBufferToUuidString,getRandomBoolean:b.getRandomBoolean,getRandomImei:b.getRandomImei,getRandomDateInRange:b.getRandomDateInRange,getRandomInteger:b.getRandomInteger,getRandomString:b.getRandomString,tryParseBoolean:g.tryParseBoolean,tryParseDate:g.tryParseDate,tryParseFloat:g.tryParseFloat,allAttributesAreNull:p.allAttributesAreNull,anyAttributeInArrayIsNull:p.anyAttributeInArrayIsNull,anyAttributeIsNull:p.anyAttributeIsNull,now:m.now,addMonthsToNow:m.addMonthsToNow,mapRawEntityToEntity:y.mapRawEntityToEntity};Object.defineProperty(exports,"Repository",{enumerable:!0,get:function(){return e.Repository}}),exports.Cache=t,exports.Entities=r,exports.ACTIVE_JOB_LIFECYCLES=o.ACTIVE_JOB_LIFECYCLES,exports.JobHealthSignalValue=o.JobHealthSignalValue,exports.JobLifecycleValue=o.JobLifecycleValue,exports.JobOutcomeValue=o.JobOutcomeValue,exports.JobProofStateValue=o.JobProofStateValue,exports.JobRuleKindValue=o.JobRuleKindValue,exports.JobTimelineKindValue=o.JobTimelineKindValue,exports.JobCustomerLinkDeliveryStatusValue=a.JobCustomerLinkDeliveryStatusValue,exports.JobCustomerLinkStatusValue=a.JobCustomerLinkStatusValue,exports.NovaDataSource=s.NovaDataSource,exports.syncSchemaFromDump=i.syncSchemaFromDump,exports.Types=u,exports.Enums=n,exports.ConsoleLogger=l.ConsoleLogger,exports.queryTags=d.queryTags,exports.Utils=x;
|
package/package.json
CHANGED
package/schema.sql
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
-- nova-orm-schema-checksum:
|
|
1
|
+
-- nova-orm-schema-checksum: 51e7d7d55485ce5f17c4b930e7165f26
|
|
2
2
|
-- Nova ORM Schema Dump
|
|
3
|
-
-- Generated at: 2026-08-
|
|
3
|
+
-- Generated at: 2026-08-24T12:38:06.185Z
|
|
4
4
|
|
|
5
5
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
6
6
|
|
|
@@ -3797,6 +3797,20 @@ CREATE TABLE `trip` (
|
|
|
3797
3797
|
`startPositionId` bigint DEFAULT NULL,
|
|
3798
3798
|
`endPositionId` bigint DEFAULT NULL,
|
|
3799
3799
|
`forceReason` varchar(32) DEFAULT NULL,
|
|
3800
|
+
`summaryVersion` tinyint unsigned NOT NULL DEFAULT '0',
|
|
3801
|
+
`summaryAt` datetime(3) DEFAULT NULL,
|
|
3802
|
+
`maxSpeed` float DEFAULT NULL,
|
|
3803
|
+
`avgSpeed` float DEFAULT NULL,
|
|
3804
|
+
`idleSec` int unsigned DEFAULT NULL,
|
|
3805
|
+
`polyline` text,
|
|
3806
|
+
`alertCount` smallint unsigned DEFAULT NULL,
|
|
3807
|
+
`alertTypeIds` varchar(128) DEFAULT NULL,
|
|
3808
|
+
`issueCount` smallint unsigned DEFAULT NULL,
|
|
3809
|
+
`issueTypeIds` varchar(128) DEFAULT NULL,
|
|
3810
|
+
`speedingCount` smallint unsigned DEFAULT NULL,
|
|
3811
|
+
`maxOverKph` float DEFAULT NULL,
|
|
3812
|
+
`placeIds` varchar(255) DEFAULT NULL,
|
|
3813
|
+
`endedOffPlace` tinyint(1) DEFAULT NULL,
|
|
3800
3814
|
PRIMARY KEY (`id`),
|
|
3801
3815
|
UNIQUE KEY `ixuTripGuid` (`tripGuid`),
|
|
3802
3816
|
KEY `ixTripClientIdImeiStartDate` (`clientId`,`imei`,`startDate`),
|