---
title: "ProductOption"
generated: true
---
<GenerationInfo sourceFile="packages/core/src/entity/product-option/product-option.entity.ts" sourceLine="21" packageName="@vendure/core" />

A ProductOption is used to differentiate <DocsLink href="/reference/typescript-api/entities/product-variant#productvariant">ProductVariant</DocsLink>s from one another.

```ts title="Signature"
class ProductOption extends VendureEntity implements Translatable, HasCustomFields, SoftDeletable {
    constructor(input?: DeepPartial<ProductOption>)
    @Column({ type: Date, nullable: true })
    deletedAt: Date | null;
    name: LocaleString;
    @Column() code: string;
    @OneToMany(type => ProductOptionTranslation, translation => translation.base, { eager: true })
    translations: Array<Translation<ProductOption>>;
    @Index()
    @ManyToOne(type => ProductOptionGroup, group => group.options)
    group: ProductOptionGroup;
    @EntityId()
    groupId: ID;
    @ManyToMany(type => ProductVariant, variant => variant.options)
    productVariants: ProductVariant[];
    @Column(type => CustomProductOptionFields)
    customFields: CustomProductOptionFields;
}
```
* Extends: <DocsLink href="/reference/typescript-api/entities/vendure-entity#vendureentity">`VendureEntity`</DocsLink>


* Implements: <DocsLink href="/reference/typescript-api/entities/interfaces#translatable">`Translatable`</DocsLink>, HasCustomFields, <DocsLink href="/reference/typescript-api/entities/interfaces#softdeletable">`SoftDeletable`</DocsLink>



<div className="members-wrapper">

### constructor

<MemberInfo kind="method" type={`(input?: `DeepPartial<`<a href='/reference/typescript-api/entities/product-option#productoption'>ProductOption</a>`>`) => ProductOption`}   />


### deletedAt

<MemberInfo kind="property" type={`Date | null`}   />


### name

<MemberInfo kind="property" type={`LocaleString`}   />


### code

<MemberInfo kind="property" type={`string`}   />


### translations

<MemberInfo kind="property" type={``Array<Translation<`<a href='/reference/typescript-api/entities/product-option#productoption'>ProductOption</a>`>>``}   />


### group

<MemberInfo kind="property" type={`<a href='/reference/typescript-api/entities/product-option-group#productoptiongroup'>ProductOptionGroup</a>`}   />


### groupId

<MemberInfo kind="property" type={`<a href='/reference/typescript-api/common/id#id'>ID</a>`}   />


### productVariants

<MemberInfo kind="property" type={`<a href='/reference/typescript-api/entities/product-variant#productvariant'>ProductVariant</a>[]`}   />


### customFields

<MemberInfo kind="property" type={`CustomProductOptionFields`}   />




</div>
