diff --git a/packages/core/src/entity/product-option-group/product-option-group.entity.ts b/packages/core/src/entity/product-option-group/product-option-group.entity.ts index e6973634bc..99665f16cf 100644 --- a/packages/core/src/entity/product-option-group/product-option-group.entity.ts +++ b/packages/core/src/entity/product-option-group/product-option-group.entity.ts @@ -1,6 +1,7 @@ import { DeepPartial } from '@vendure/common/lib/shared-types'; import { Column, Entity, ManyToOne, OneToMany } from 'typeorm'; +import { SoftDeletable } from '../../common/types/common-types'; import { LocaleString, Translatable, Translation } from '../../common/types/locale-types'; import { HasCustomFields } from '../../config/custom-field/custom-field-types'; import { VendureEntity } from '../base/base.entity'; @@ -17,10 +18,14 @@ import { ProductOptionGroupTranslation } from './product-option-group-translatio * @docsCategory entities */ @Entity() -export class ProductOptionGroup extends VendureEntity implements Translatable, HasCustomFields { +export class ProductOptionGroup + extends VendureEntity + implements Translatable, HasCustomFields, SoftDeletable { constructor(input?: DeepPartial) { super(input); } + @Column({ type: Date, nullable: true }) + deletedAt: Date | null; name: LocaleString; diff --git a/packages/core/src/entity/product-option/product-option.entity.ts b/packages/core/src/entity/product-option/product-option.entity.ts index 8ec9c77742..5f2939d43e 100644 --- a/packages/core/src/entity/product-option/product-option.entity.ts +++ b/packages/core/src/entity/product-option/product-option.entity.ts @@ -1,6 +1,7 @@ import { DeepPartial, ID } from '@vendure/common/lib/shared-types'; import { Column, Entity, ManyToOne, OneToMany } from 'typeorm'; +import { SoftDeletable } from '../../common/types/common-types'; import { LocaleString, Translatable, Translation } from '../../common/types/locale-types'; import { HasCustomFields } from '../../config/custom-field/custom-field-types'; import { VendureEntity } from '../base/base.entity'; @@ -17,10 +18,12 @@ import { ProductOptionTranslation } from './product-option-translation.entity'; * @docsCategory entities */ @Entity() -export class ProductOption extends VendureEntity implements Translatable, HasCustomFields { +export class ProductOption extends VendureEntity implements Translatable, HasCustomFields, SoftDeletable { constructor(input?: DeepPartial) { super(input); } + @Column({ type: Date, nullable: true }) + deletedAt: Date | null; name: LocaleString;