Facet

Facet

Documentation generated from facet.entity.ts on Feb 19 2019 at 16:20

A Facet is a class of properties which can be applied to a Product or ProductVariant. They are used to enable faceted search whereby products can be filtered along a number of dimensions (facets).

For example, there could be a Facet named “Brand” which has a number of FacetValues representing the various brands of product, e.g. “Apple”, “Samsung”, “Dell”, “HP” etc.

Signature

class Facet {
  constructor(input: DeepPartial<Facet>)
  name: LocaleString;
  @Column({ unique: true })
    code: string;
  @OneToMany(type => FacetTranslation, translation => translation.base, { eager: true })
    translations: Array<Translation<Facet>>;
  @OneToMany(type => FacetValue, value => value.facet)
    values: FacetValue[];
  @Column(type => CustomFacetFields)
    customFields: CustomFacetFields;
}

Members

constructor

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

name

property
type:
LocaleString

code

property
type:
string

translations

property
type:
Array<Translation<Facet>>

values

property
type:
FacetValue[]

customFields

property
type:
CustomFacetFields
alpha