|
|
@@ -2,6 +2,7 @@ import { CurrencyCode } from '@vendure/common/lib/generated-types';
|
|
|
import { DeepPartial, ID } from '@vendure/common/lib/shared-types';
|
|
|
import { Column, Entity, Index, ManyToOne } from 'typeorm';
|
|
|
|
|
|
+import { CustomProductVariantPriceFields, HasCustomFields } from '../..';
|
|
|
import { VendureEntity } from '../base/base.entity';
|
|
|
import { EntityId } from '../entity-id.decorator';
|
|
|
import { Money } from '../money.decorator';
|
|
|
@@ -16,7 +17,7 @@ import { ProductVariant } from './product-variant.entity';
|
|
|
* @docsCategory entities
|
|
|
*/
|
|
|
@Entity()
|
|
|
-export class ProductVariantPrice extends VendureEntity {
|
|
|
+export class ProductVariantPrice extends VendureEntity implements HasCustomFields {
|
|
|
constructor(input?: DeepPartial<ProductVariantPrice>) {
|
|
|
super(input);
|
|
|
}
|
|
|
@@ -31,4 +32,7 @@ export class ProductVariantPrice extends VendureEntity {
|
|
|
@Index()
|
|
|
@ManyToOne(type => ProductVariant, variant => variant.productVariantPrices, { onDelete: 'CASCADE' })
|
|
|
variant: ProductVariant;
|
|
|
+
|
|
|
+ @Column(type => CustomProductVariantPriceFields)
|
|
|
+ customFields: CustomProductVariantPriceFields;
|
|
|
}
|