Collection

Collection

Documentation generated from collection.entity.ts on Mar 14 2019 at 20:14

A Collection is a grouping of Products based on various configurable criteria.

Signature

class Collection extends VendureEntity implements Translatable, HasCustomFields, ChannelAware {
  constructor(input: DeepPartial<Collection>)
  @Column({ default: false })
    isRoot: boolean;
  @Column()
    position: number;
  name: LocaleString;
  description: LocaleString;
  @OneToMany(type => CollectionTranslation, translation => translation.base, { eager: true })
    translations: Array<Translation<Collection>>;
  @ManyToOne(type => Asset)
    featuredAsset: Asset;
  @ManyToMany(type => Asset)
    @JoinTable()
    assets: Asset[];
  @Column('simple-json') filters: ConfigurableOperation[];
  @ManyToMany(type => ProductVariant, productVariant => productVariant.collections)
    @JoinTable()
    productVariants: ProductVariant[];
  @Column(type => CustomCollectionFields)
    customFields: CustomCollectionFields;
  @TreeChildren()
    children: Collection[];
  @TreeParent()
    parent: Collection;
  @ManyToMany(type => Channel)
    @JoinTable()
    channels: Channel[];
}

Members

constructor

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

isRoot

property
type:
boolean

position

property
type:
number

name

property
type:
LocaleString

description

property
type:
LocaleString

translations

property
type:
Array<Translation<Collection>>

featuredAsset

property
type:
Asset

assets

property
type:
Asset[]

filters

property
type:
ConfigurableOperation[]

productVariants

property
type:
ProductVariant[]

customFields

property
type:
CustomCollectionFields

children

property
type:
Collection[]

parent

property
type:
Collection

channels

property
type:
Channel[]
alpha