ProductOption

ProductOption

ProductOption

A ProductOption is used to differentiate ProductVariants from one another.

Signature

class ProductOption extends VendureEntity implements Translatable, HasCustomFields {
  constructor(input?: DeepPartial<ProductOption>)
  name: LocaleString;
  @Column() code: string;
  @OneToMany(type => ProductOptionTranslation, translation => translation.base, { eager: true })
    translations: Array<Translation<ProductOption>>;
  @ManyToOne(type => ProductOptionGroup, group => group.options)
    group: ProductOptionGroup;
  @EntityId()
    groupId: ID;
  @Column(type => CustomProductOptionFields)
    customFields: CustomProductOptionFields;
}

Members

constructor

method
type:
(input?: DeepPartial<ProductOption>) => ProductOption

name

property
type:
LocaleString

code

property
type:
string

translations

property
type:
Array<Translation<ProductOption>>

group

property

groupId

property
type:
ID

customFields

property
type:
CustomProductOptionFields