UNPKG

pure-orm

Version:

A SQL Toolkit based on pure business objects passed to and from stateful data access objects

42 lines (41 loc) 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.inventoryLevelEntity = exports.InventoryLevels = exports.InventoryLevel = exports.columns = exports.tableName = void 0; const actual_product_variant_1 = require("./actual-product-variant"); const shipment_1 = require("./shipment"); exports.tableName = 'inventory_level'; exports.columns = [ 'id', 'inventory_location_id', { column: 'actual_product_variant_id', references: actual_product_variant_1.ActualProductVariant }, 'available', { column: 'next_shipment_id', references: shipment_1.Shipment }, 'sellable_when_sold_out', 'updated_date' ]; class InventoryLevel { constructor(props) { this.id = props.id; this.inventoryLocationId = props.inventoryLocationId; this.actualProductVariantId = props.actualProductVariantId; this.actualProductVariant = props.actualProductVariant; this.available = props.available; this.nextShipmentId = props.nextShipmentId; this.nextShipment = props.nextShipment; this.sellableWhenSoldOut = props.sellableWhenSoldOut; this.updateDate = props.updateDate; } } exports.InventoryLevel = InventoryLevel; class InventoryLevels { constructor({ models }) { this.models = models; } } exports.InventoryLevels = InventoryLevels; exports.inventoryLevelEntity = { tableName: exports.tableName, columns: exports.columns, Model: InventoryLevel, Collection: InventoryLevels };