ProductState

The state of a Product, changed in place by its events. It is the storefront's read model too: the snapshot queries filter it by category, brand and status and sort it by price, so each of those leads an index whose further keys are the storefront's usual filter and sort ("the published products of a category, cheapest first").

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
@QueryIndex(with = ["state.status", "state.price"])
var brandId: String?
Link copied to clipboard
@QueryIndex(with = ["state.status", "state.price"])
var categoryId: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@QueryIndex(with = ["state.price"])
var status: ProductStatus

Functions

Link copied to clipboard

A discontinued product is off the storefront; the kernel marks it deleted by the lifecycle event beside.