Collection
Collection
A Collection is a grouping of Products based on various configurable criteria.
Signature
class Collection extends VendureEntity implements Translatable, HasCustomFields, ChannelAware, Orderable {
    constructor(input?: DeepPartial<Collection>)
    @Column({ default: false })
    isRoot: boolean;
    @Column()
    position: number;
    @Column({ default: false })
    isPrivate: boolean;
    name: LocaleString;
    description: LocaleString;
    slug: LocaleString;
    @OneToMany(type => CollectionTranslation, translation => translation.base, { eager: true })
    translations: Array<Translation<Collection>>;
    @Index()
    @ManyToOne(type => Asset, asset => asset.featuredInCollections, { onDelete: 'SET NULL' })
    featuredAsset: Asset;
    @OneToMany(type => CollectionAsset, collectionAsset => collectionAsset.collection)
    assets: CollectionAsset[];
    @Column('simple-json') filters: ConfigurableOperation[];
    @Column({ default: true }) inheritFilters: boolean;
    @ManyToMany(type => ProductVariant, productVariant => productVariant.collections)
    @JoinTable()
    productVariants: ProductVariant[];
    @Column(type => CustomCollectionFields)
    customFields: CustomCollectionFields;
    @TreeChildren()
    children: Collection[];
    @TreeParent()
    parent: Collection;
    @EntityId({ nullable: true })
    parentId: ID;
    @ManyToMany(type => Channel, channel => channel.collections)
    @JoinTable()
    channels: Channel[];
}
- 
Extends: VendureEntity
- 
Implements: Translatable,HasCustomFields,ChannelAware,Orderable
constructor
method
(input?: DeepPartial<Collection>) => CollectionisRoot
property
booleanposition
property
numberisPrivate
property
booleanname
property
LocaleStringdescription
property
LocaleStringslug
property
LocaleStringtranslations
property
Array<Translation<Collection>>featuredAsset
property
assets
property
CollectionAsset[]filters
property
ConfigurableOperation[]inheritFilters
property
v2.0.0
booleanproductVariants
property
customFields
property
CustomCollectionFieldschildren
property
parent
property
parentId
property
channels
property
Channel[]