Skip to main content

StockLevel

StockLevel

A StockLevel represents the number of a particular ProductVariant which are available at a particular StockLocation.

Signature
class StockLevel extends VendureEntity {
constructor(input: DeepPartial<StockLevel>)
@Index()
@ManyToOne(type => ProductVariant, productVariant => productVariant.stockLevels, { onDelete: 'CASCADE' })
productVariant: ProductVariant;
@EntityId()
productVariantId: ID;
@Index()
@ManyToOne(type => StockLocation, { onDelete: 'CASCADE' })
stockLocation: StockLocation;
@EntityId()
stockLocationId: ID;
@Column()
stockOnHand: number;
@Column()
stockAllocated: number;
}

constructor

method
(input: DeepPartial<StockLevel>) => StockLevel

productVariant

productVariantId

property

stockLocation

stockLocationId

property

stockOnHand

property
number

stockAllocated

property
number