@spytecgps/nova-orm 1.4.180 → 1.4.182
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/retailIncident.js +1 -1
- package/dist/entities/retailItem.js +1 -1
- package/dist/entities/retailItemEvent.js +1 -1
- package/dist/entities/retailProduct.js +1 -1
- package/dist/migration/_virtual/_virtual_multi-entry.js +2 -2
- package/dist/src/entities/retailItemEvent.d.ts +1 -0
- package/package.json +1 -1
- package/schema.sql +16 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailIncident=class RetailIncident{id;clientId;storeId;itemId;type;status;severity;description;estimatedLoss;zoneId;detectedAt;resolvedAt;resolvedBy;resolutionNotes;createdAt;updatedAt;retailStore;retailItem;retailZone},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"id",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.RetailIncident.prototype,"clientId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"storeId",void 0),e.__decorate([t.Column("binary",{name:"itemId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"itemId",void 0),e.__decorate([t.Column("varchar",{name:"type",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"type",void 0),e.__decorate([t.Column("varchar",{name:"status",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"status",void 0),e.__decorate([t.Column("varchar",{name:"severity",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"severity",void 0),e.__decorate([t.Column("varchar",{name:"description",length:255}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"description",void 0),e.__decorate([t.Column("decimal",{name:"estimatedLoss",precision:19,scale:4,nullable:!0}),e.__metadata("design:type",Number)],exports.RetailIncident.prototype,"estimatedLoss",void 0),e.__decorate([t.Column("binary",{name:"zoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"zoneId",void 0),e.__decorate([t.Column("datetime",{name:"detectedAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"detectedAt",void 0),e.__decorate([t.Column("datetime",{name:"resolvedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"resolvedAt",void 0),e.__decorate([t.Column("varchar",{name:"resolvedBy",length:50,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"resolvedBy",void 0),e.__decorate([t.Column("varchar",{name:"resolution",length:255,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"resolutionNotes",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"updatedAt",void 0),exports.RetailIncident=e.__decorate([t.Index("
|
|
1
|
+
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailIncident=class RetailIncident{id;clientId;storeId;itemId;type;status;severity;description;estimatedLoss;zoneId;detectedAt;resolvedAt;resolvedBy;resolutionNotes;createdAt;updatedAt;retailStore;retailItem;retailZone},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"id",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.RetailIncident.prototype,"clientId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"storeId",void 0),e.__decorate([t.Column("binary",{name:"itemId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"itemId",void 0),e.__decorate([t.Column("varchar",{name:"type",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"type",void 0),e.__decorate([t.Column("varchar",{name:"status",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"status",void 0),e.__decorate([t.Column("varchar",{name:"severity",length:20}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"severity",void 0),e.__decorate([t.Column("varchar",{name:"description",length:255}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"description",void 0),e.__decorate([t.Column("decimal",{name:"estimatedLoss",precision:19,scale:4,nullable:!0}),e.__metadata("design:type",Number)],exports.RetailIncident.prototype,"estimatedLoss",void 0),e.__decorate([t.Column("binary",{name:"zoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"zoneId",void 0),e.__decorate([t.Column("datetime",{name:"detectedAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"detectedAt",void 0),e.__decorate([t.Column("datetime",{name:"resolvedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"resolvedAt",void 0),e.__decorate([t.Column("varchar",{name:"resolvedBy",length:50,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"resolvedBy",void 0),e.__decorate([t.Column("varchar",{name:"resolution",length:255,nullable:!0}),e.__metadata("design:type",String)],exports.RetailIncident.prototype,"resolutionNotes",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailIncident.prototype,"updatedAt",void 0),exports.RetailIncident=e.__decorate([t.Index("ix_clientId_storeId_detectedAt_type_estimatedLoss",["clientId","storeId","detectedAt","type","estimatedLoss"],{}),t.Index("ix_clientId_storeId_type_detectedAt",["clientId","storeId","type","detectedAt"],{}),t.Index("ix_clientId_detectedAt_type_estimatedLoss",["clientId","detectedAt","type","estimatedLoss"],{}),t.Index("ix_itemId_detectedAt_type",["itemId"],{}),t.Entity("retailIncident",{schema:"nova"})],exports.RetailIncident);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),r=require("../utils/uuidTransformer.js");exports.RetailItem=class RetailItem{id;bleTagId;productId;storeId;homeZoneId;currentZoneId;status;batteryLevel;lastMovedAt;enteredCurrentZoneAt;receivedAt;soldAt;createdAt;updatedAt;retailProduct;retailStore;retailZone;bleTag},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"id",void 0),e.__decorate([t.Column("binary",{name:"bleTagId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"bleTagId",void 0),e.__decorate([t.Column("binary",{name:"productId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"productId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"storeId",void 0),e.__decorate([t.Column("binary",{name:"homeZoneId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"homeZoneId",void 0),e.__decorate([t.Column("binary",{name:"currentZoneId",length:16,transformer:r.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"currentZoneId",void 0),e.__decorate([t.Column("varchar",{name:"status",length:20}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"status",void 0),e.__decorate([t.Column("smallint",{name:"batteryLevel",nullable:!0}),e.__metadata("design:type",Number)],exports.RetailItem.prototype,"batteryLevel",void 0),e.__decorate([t.Column("datetime",{name:"lastMovedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"lastMovedAt",void 0),e.__decorate([t.Column("datetime",{name:"enteredCurrentZoneAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"enteredCurrentZoneAt",void 0),e.__decorate([t.Column("datetime",{name:"receivedAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"receivedAt",void 0),e.__decorate([t.Column("datetime",{name:"soldAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"soldAt",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"updatedAt",void 0),exports.RetailItem=e.__decorate([t.Index("ix_bleTagId_productId",["bleTagId","productId"],{unique:!0}),t.Index("ix_storeId_currentZoneId",["storeId","currentZoneId"],{}),t.Index("
|
|
1
|
+
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),r=require("../utils/uuidTransformer.js");exports.RetailItem=class RetailItem{id;bleTagId;productId;storeId;homeZoneId;currentZoneId;status;batteryLevel;lastMovedAt;enteredCurrentZoneAt;receivedAt;soldAt;createdAt;updatedAt;retailProduct;retailStore;retailZone;bleTag},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"id",void 0),e.__decorate([t.Column("binary",{name:"bleTagId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"bleTagId",void 0),e.__decorate([t.Column("binary",{name:"productId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"productId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"storeId",void 0),e.__decorate([t.Column("binary",{name:"homeZoneId",length:16,transformer:r.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"homeZoneId",void 0),e.__decorate([t.Column("binary",{name:"currentZoneId",length:16,transformer:r.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"currentZoneId",void 0),e.__decorate([t.Column("varchar",{name:"status",length:20}),e.__metadata("design:type",String)],exports.RetailItem.prototype,"status",void 0),e.__decorate([t.Column("smallint",{name:"batteryLevel",nullable:!0}),e.__metadata("design:type",Number)],exports.RetailItem.prototype,"batteryLevel",void 0),e.__decorate([t.Column("datetime",{name:"lastMovedAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"lastMovedAt",void 0),e.__decorate([t.Column("datetime",{name:"enteredCurrentZoneAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"enteredCurrentZoneAt",void 0),e.__decorate([t.Column("datetime",{name:"receivedAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"receivedAt",void 0),e.__decorate([t.Column("datetime",{name:"soldAt",nullable:!0}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"soldAt",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailItem.prototype,"updatedAt",void 0),exports.RetailItem=e.__decorate([t.Index("ix_bleTagId_productId",["bleTagId","productId"],{unique:!0}),t.Index("ix_storeId_currentZoneId",["storeId","currentZoneId"],{}),t.Index("ix_productId_storeId_receivedAt",["productId","storeId","receivedAt"],{}),t.Index("ix_productId_receivedAt",["productId","receivedAt"],{}),t.Entity("retailItem",{schema:"nova"})],exports.RetailItem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailItemEvent=class RetailItemEvent{id;itemId;bleTagId;storeId;eventType;zoneId;zoneCategory;gatewayId;metadata;timestamp;duration},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"id",void 0),e.__decorate([t.Column("binary",{name:"itemId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"itemId",void 0),e.__decorate([t.Column("binary",{name:"bleTagId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"bleTagId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"storeId",void 0),e.__decorate([t.Column("varchar",{name:"eventType",length:20}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"eventType",void 0),e.__decorate([t.Column("binary",{name:"zoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"zoneId",void 0),e.__decorate([t.Column("varchar",{name:"zoneCategory",length:50,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"zoneCategory",void 0),e.__decorate([t.Column("binary",{name:"gatewayId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"gatewayId",void 0),e.__decorate([t.Column("json",{name:"metadata",nullable:!0}),e.__metadata("design:type",Object)],exports.RetailItemEvent.prototype,"metadata",void 0),e.__decorate([t.Column("datetime",{name:"timestamp"}),e.__metadata("design:type",Date)],exports.RetailItemEvent.prototype,"timestamp",void 0),e.__decorate([t.Column("int",{name:"duration",nullable:!0}),e.__metadata("design:type",Number)],exports.RetailItemEvent.prototype,"duration",void 0),exports.RetailItemEvent=e.__decorate([t.Index("
|
|
1
|
+
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailItemEvent=class RetailItemEvent{id;itemId;bleTagId;productId;storeId;eventType;zoneId;zoneCategory;gatewayId;metadata;timestamp;duration},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"id",void 0),e.__decorate([t.Column("binary",{name:"itemId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"itemId",void 0),e.__decorate([t.Column("binary",{name:"bleTagId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"bleTagId",void 0),e.__decorate([t.Column("binary",{name:"productId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"productId",void 0),e.__decorate([t.Column("binary",{name:"storeId",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"storeId",void 0),e.__decorate([t.Column("varchar",{name:"eventType",length:20}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"eventType",void 0),e.__decorate([t.Column("binary",{name:"zoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"zoneId",void 0),e.__decorate([t.Column("varchar",{name:"zoneCategory",length:50,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"zoneCategory",void 0),e.__decorate([t.Column("binary",{name:"gatewayId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailItemEvent.prototype,"gatewayId",void 0),e.__decorate([t.Column("json",{name:"metadata",nullable:!0}),e.__metadata("design:type",Object)],exports.RetailItemEvent.prototype,"metadata",void 0),e.__decorate([t.Column("datetime",{name:"timestamp"}),e.__metadata("design:type",Date)],exports.RetailItemEvent.prototype,"timestamp",void 0),e.__decorate([t.Column("int",{name:"duration",nullable:!0}),e.__metadata("design:type",Number)],exports.RetailItemEvent.prototype,"duration",void 0),exports.RetailItemEvent=e.__decorate([t.Index("ix_eventType_timestamp_productId",["eventType","timestamp","productId"],{}),t.Index("ix_eventType_zoneCategory_timestamp",["eventType","zoneCategory","timestamp"],{}),t.Index("ix_storeId_eventType_timestamp_productId",["storeId","eventType","timestamp","productId"],{}),t.Index("ix_storeId_eventType_zoneCategory_timestamp",["storeId","eventType","zoneCategory","timestamp"],{}),t.Index("ix_storeId_itemId_eventType_timestamp",["storeId","itemId","eventType","timestamp"],{}),t.Index("ix_storeId_itemId_zoneId_eventType_timestamp",["storeId","itemId","zoneId","eventType","timestamp"],{}),t.Index("ix_itemId_eventType_zoneCategory_timestamp",["itemId","eventType","zoneCategory","timestamp"],{}),t.Index("ix_itemId_eventType_timestamp_storeId",["itemId","eventType","timestamp","storeId"],{}),t.Index("ix_itemId_zoneId_eventType_timestamp",["itemId","zoneId","eventType","timestamp"],{}),t.Index("ix_bleTagId",["bleTagId"],{}),t.Entity("retailItemEvent",{schema:"nova"})],exports.RetailItemEvent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailProduct=class RetailProduct{id;clientId;upc;sku;name;brand;category;defaultZoneId;price;imageUrl;attributes;createdAt;updatedAt},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"id",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.RetailProduct.prototype,"clientId",void 0),e.__decorate([t.Column("varchar",{name:"upc",length:12}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"upc",void 0),e.__decorate([t.Column("varchar",{name:"sku",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"sku",void 0),e.__decorate([t.Column("varchar",{name:"name",length:100}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"name",void 0),e.__decorate([t.Column("varchar",{name:"brand",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"brand",void 0),e.__decorate([t.Column("varchar",{name:"category",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"category",void 0),e.__decorate([t.Column("binary",{name:"defaultZoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"defaultZoneId",void 0),e.__decorate([t.Column("decimal",{name:"price",precision:19,scale:4}),e.__metadata("design:type",Number)],exports.RetailProduct.prototype,"price",void 0),e.__decorate([t.Column("varchar",{name:"imageUrl",length:255,nullable:!0}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"imageUrl",void 0),e.__decorate([t.Column("json",{name:"attributes",nullable:!0}),e.__metadata("design:type",Object)],exports.RetailProduct.prototype,"attributes",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailProduct.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailProduct.prototype,"updatedAt",void 0),exports.RetailProduct=e.__decorate([t.Index("ix_clientId_upc",["clientId","upc"],{unique:!0}),t.Index("ix_clientId_brand_category",["clientId","brand","category"],{}),t.Entity("retailProduct",{schema:"nova"})],exports.RetailProduct);
|
|
1
|
+
"use strict";var e=require("../node_modules/tslib/tslib.es6.js"),t=require("typeorm"),a=require("../utils/uuidTransformer.js");exports.RetailProduct=class RetailProduct{id;clientId;upc;sku;name;brand;category;defaultZoneId;price;imageUrl;attributes;createdAt;updatedAt},e.__decorate([t.PrimaryColumn("binary",{name:"id",length:16,transformer:a.UUIDTransformer}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"id",void 0),e.__decorate([t.Column("int",{name:"clientId"}),e.__metadata("design:type",Number)],exports.RetailProduct.prototype,"clientId",void 0),e.__decorate([t.Column("varchar",{name:"upc",length:12}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"upc",void 0),e.__decorate([t.Column("varchar",{name:"sku",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"sku",void 0),e.__decorate([t.Column("varchar",{name:"name",length:100}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"name",void 0),e.__decorate([t.Column("varchar",{name:"brand",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"brand",void 0),e.__decorate([t.Column("varchar",{name:"category",length:50}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"category",void 0),e.__decorate([t.Column("binary",{name:"defaultZoneId",length:16,transformer:a.UUIDTransformer,nullable:!0}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"defaultZoneId",void 0),e.__decorate([t.Column("decimal",{name:"price",precision:19,scale:4}),e.__metadata("design:type",Number)],exports.RetailProduct.prototype,"price",void 0),e.__decorate([t.Column("varchar",{name:"imageUrl",length:255,nullable:!0}),e.__metadata("design:type",String)],exports.RetailProduct.prototype,"imageUrl",void 0),e.__decorate([t.Column("json",{name:"attributes",nullable:!0}),e.__metadata("design:type",Object)],exports.RetailProduct.prototype,"attributes",void 0),e.__decorate([t.CreateDateColumn({name:"createdAt"}),e.__metadata("design:type",Date)],exports.RetailProduct.prototype,"createdAt",void 0),e.__decorate([t.UpdateDateColumn({name:"updatedAt"}),e.__metadata("design:type",Date)],exports.RetailProduct.prototype,"updatedAt",void 0),exports.RetailProduct=e.__decorate([t.Index("ix_category",["category"],{}),t.Index("ix_clientId_upc",["clientId","upc"],{unique:!0}),t.Index("ix_clientId_brand_category",["clientId","brand","category"],{}),t.Entity("retailProduct",{schema:"nova"})],exports.RetailProduct);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _1684483705001UpdateSecurityUserViewsV1 = require('../1684483705001-updateSecurityUserViewsV1.js');
|
|
4
3
|
var _1684483704434AddLowerCaseIndex = require('../1684483704434-addLowerCaseIndex.js');
|
|
5
4
|
var _1684483705002UpdateSecurityUserViewsV2 = require('../1684483705002-updateSecurityUserViewsV2.js');
|
|
5
|
+
var _1684483705001UpdateSecurityUserViewsV1 = require('../1684483705001-updateSecurityUserViewsV1.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.updateSecurityUserViewsV11684483705001 = _1684483705001UpdateSecurityUserViewsV1.updateSecurityUserViewsV11684483705001;
|
|
10
9
|
exports.addLowerCaseIndex1684483704434 = _1684483704434AddLowerCaseIndex.addLowerCaseIndex1684483704434;
|
|
11
10
|
exports.updateSecurityUserViewsV21684483705002 = _1684483705002UpdateSecurityUserViewsV2.updateSecurityUserViewsV21684483705002;
|
|
11
|
+
exports.updateSecurityUserViewsV11684483705001 = _1684483705001UpdateSecurityUserViewsV1.updateSecurityUserViewsV11684483705001;
|
package/package.json
CHANGED
package/schema.sql
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
-- nova-orm-schema-checksum:
|
|
1
|
+
-- nova-orm-schema-checksum: 4f8fa1f3b2432f367bc8830c3b122468
|
|
2
2
|
-- Nova ORM Schema Dump
|
|
3
|
-
-- Generated at: 2026-02-
|
|
3
|
+
-- Generated at: 2026-02-18T14:37:54.791Z
|
|
4
4
|
|
|
5
5
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
6
6
|
|
|
@@ -2576,8 +2576,10 @@ CREATE TABLE `retailIncident` (
|
|
|
2576
2576
|
`createdAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
|
|
2577
2577
|
`updatedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
|
2578
2578
|
PRIMARY KEY (`id`),
|
|
2579
|
-
KEY `
|
|
2580
|
-
KEY `
|
|
2579
|
+
KEY `ix_itemId_detectedAt_type` (`itemId`),
|
|
2580
|
+
KEY `ix_clientId_detectedAt_type_estimatedLoss` (`clientId`,`detectedAt`,`type`,`estimatedLoss`),
|
|
2581
|
+
KEY `ix_clientId_storeId_type_detectedAt` (`clientId`,`storeId`,`type`,`detectedAt`),
|
|
2582
|
+
KEY `ix_clientId_storeId_detectedAt_type_estimatedLoss` (`clientId`,`storeId`,`detectedAt`,`type`,`estimatedLoss`)
|
|
2581
2583
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
2582
2584
|
|
|
2583
2585
|
DROP TABLE IF EXISTS `retailItem`;
|
|
@@ -2598,7 +2600,8 @@ CREATE TABLE `retailItem` (
|
|
|
2598
2600
|
`updatedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
|
2599
2601
|
PRIMARY KEY (`id`),
|
|
2600
2602
|
UNIQUE KEY `ix_bleTagId_productId` (`bleTagId`,`productId`),
|
|
2601
|
-
KEY `
|
|
2603
|
+
KEY `ix_productId_receivedAt` (`productId`,`receivedAt`),
|
|
2604
|
+
KEY `ix_productId_storeId_receivedAt` (`productId`,`storeId`,`receivedAt`),
|
|
2602
2605
|
KEY `ix_storeId_currentZoneId` (`storeId`,`currentZoneId`)
|
|
2603
2606
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
2604
2607
|
|
|
@@ -2607,6 +2610,7 @@ CREATE TABLE `retailItemEvent` (
|
|
|
2607
2610
|
`id` binary(16) NOT NULL,
|
|
2608
2611
|
`itemId` binary(16) NOT NULL,
|
|
2609
2612
|
`bleTagId` binary(16) NOT NULL,
|
|
2613
|
+
`productId` binary(16) DEFAULT NULL,
|
|
2610
2614
|
`storeId` binary(16) NOT NULL,
|
|
2611
2615
|
`eventType` varchar(20) NOT NULL,
|
|
2612
2616
|
`zoneId` binary(16) DEFAULT NULL,
|
|
@@ -2617,11 +2621,15 @@ CREATE TABLE `retailItemEvent` (
|
|
|
2617
2621
|
`duration` int DEFAULT NULL,
|
|
2618
2622
|
PRIMARY KEY (`id`),
|
|
2619
2623
|
KEY `ix_bleTagId` (`bleTagId`),
|
|
2624
|
+
KEY `ix_itemId_zoneId_eventType_timestamp` (`itemId`,`zoneId`,`eventType`,`timestamp`),
|
|
2620
2625
|
KEY `ix_itemId_eventType_timestamp_storeId` (`itemId`,`eventType`,`timestamp`,`storeId`),
|
|
2621
2626
|
KEY `ix_itemId_eventType_zoneCategory_timestamp` (`itemId`,`eventType`,`zoneCategory`,`timestamp`),
|
|
2627
|
+
KEY `ix_storeId_itemId_zoneId_eventType_timestamp` (`storeId`,`itemId`,`zoneId`,`eventType`,`timestamp`),
|
|
2622
2628
|
KEY `ix_storeId_itemId_eventType_timestamp` (`storeId`,`itemId`,`eventType`,`timestamp`),
|
|
2623
2629
|
KEY `ix_storeId_eventType_zoneCategory_timestamp` (`storeId`,`eventType`,`zoneCategory`,`timestamp`),
|
|
2624
|
-
KEY `
|
|
2630
|
+
KEY `ix_storeId_eventType_timestamp_productId` (`storeId`,`eventType`,`timestamp`,`productId`),
|
|
2631
|
+
KEY `ix_eventType_zoneCategory_timestamp` (`eventType`,`zoneCategory`,`timestamp`),
|
|
2632
|
+
KEY `ix_eventType_timestamp_productId` (`eventType`,`timestamp`,`productId`)
|
|
2625
2633
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
2626
2634
|
|
|
2627
2635
|
DROP TABLE IF EXISTS `retailProduct`;
|
|
@@ -2641,7 +2649,8 @@ CREATE TABLE `retailProduct` (
|
|
|
2641
2649
|
`updatedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
|
|
2642
2650
|
PRIMARY KEY (`id`),
|
|
2643
2651
|
UNIQUE KEY `ix_clientId_upc` (`clientId`,`upc`),
|
|
2644
|
-
KEY `ix_clientId_brand_category` (`clientId`,`brand`,`category`)
|
|
2652
|
+
KEY `ix_clientId_brand_category` (`clientId`,`brand`,`category`),
|
|
2653
|
+
KEY `ix_category` (`category`)
|
|
2645
2654
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
2646
2655
|
|
|
2647
2656
|
DROP TABLE IF EXISTS `retailStore`;
|