ProductOption
ProductOption
A ProductOption is used to differentiate ProductVariants from one another.
Signature
class ProductOption extends VendureEntity implements Translatable, HasCustomFields, SoftDeletable {
constructor(input?: DeepPartial<ProductOption>)
@Column({ type: Date, nullable: true }) @Column({ type: Date, nullable: true })
deletedAt: Date | null;
name: LocaleString;
@Column() @Column() code: string;
@OneToMany(type => ProductOptionTranslation, translation => translation.base, { eager: true }) @OneToMany(type => ProductOptionTranslation, translation => translation.base, { eager: true })
translations: Array<Translation<ProductOption>>;
@Index() @ManyToOne(type => ProductOptionGroup, group => group.options) @Index()
@ManyToOne(type => ProductOptionGroup, group => group.options)
group: ProductOptionGroup;
@EntityId() @EntityId()
groupId: ID;
@Column(type => CustomProductOptionFields) @Column(type => CustomProductOptionFields)
customFields: CustomProductOptionFields;
}
Extends
Implements
- Translatable
- HasCustomFields
- SoftDeletable
Members
constructor
method
type:
(input?: DeepPartial<ProductOption>) => ProductOption
deletedAt
property
type:
Date | null
name
property
type:
LocaleString
code
property
type:
string
translations
property
type:
Array<Translation<ProductOption>>
group
property
type:
ProductOptionGroup
groupId
property
type:
ID
customFields
property
type:
CustomProductOptionFields