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' }) @Index()
@ManyToOne(type => ProductVariant, productVariant => productVariant.stockLevels, { onDelete: 'CASCADE' })
productVariant: ProductVariant;
@EntityId() @EntityId()
productVariantId: ID;
@Index() @ManyToOne(type => StockLocation, { onDelete: 'CASCADE' }) @Index()
@ManyToOne(type => StockLocation, { onDelete: 'CASCADE' })
stockLocation: StockLocation;
@EntityId() @EntityId()
stockLocationId: ID;
@Column() @Column()
stockOnHand: number;
@Column() @Column()
stockAllocated: number;
}
Extends
Members
constructor
method
type:
(input: DeepPartial<StockLevel>) => StockLevel
productVariant
property
type:
ProductVariant
productVariantId
property
type:
ID
stockLocation
property
type:
StockLocation
stockLocationId
property
type:
ID
stockOnHand
property
type:
number
stockAllocated
property
type:
number