StockLocation

StockLocation

A StockLocation represents a physical location where stock is held. For example, a warehouse or a shop.

When the stock of a ProductVariant is adjusted, the adjustment is applied to a specific StockLocation, and the stockOnHand of that ProductVariant is updated accordingly. When there are multiple StockLocations configured, the StockLocationStrategy is used to determine which StockLocation should be used for a given operation.

Signature

class StockLocation extends VendureEntity implements HasCustomFields, ChannelAware {
  constructor(input: DeepPartial<StockLocation>)
  @Column() @Column()
    name: string;
  @Column() @Column()
    description: string;
  @Column(type => CustomStockLocationFields) @Column(type => CustomStockLocationFields)
    customFields: CustomStockLocationFields;
  @ManyToMany(type => Channel) @JoinTable() @ManyToMany(type => Channel)
    @JoinTable()
    channels: Channel[];
}

Extends

Implements

Members

constructor

method
type:
(input: DeepPartial<StockLocation>) => StockLocation

name

property
type:
string

description

property
type:
string

customFields

property
type:
CustomStockLocationFields

channels

property
type:
Channel[]