class ProductVariant extends VendureEntity implements Translatable, HasCustomFields, SoftDeletable, ChannelAware { constructor(input?: DeepPartial<ProductVariant>) @Column({ type: Date, nullable: true }) deletedAt: Date | null; name: LocaleString; @Column({ default: true }) enabled: boolean; @Column() sku: string; listPrice: number; listPriceIncludesTax: boolean; currencyCode: CurrencyCode; price: number priceWithTax: number taxRateApplied: TaxRate; @Index() @ManyToOne(type => Asset, asset => asset.featuredInVariants, { onDelete: 'SET NULL' }) featuredAsset: Asset; @EntityId({ nullable: true }) featuredAssetId: ID; @OneToMany(type => ProductVariantAsset, productVariantAsset => productVariantAsset.productVariant, { onDelete: 'SET NULL', }) assets: ProductVariantAsset[]; @Index() @ManyToOne(type => TaxCategory, taxCategory => taxCategory.productVariants) taxCategory: TaxCategory; @EntityId({ nullable: true }) taxCategoryId: ID; @OneToMany(type => ProductVariantPrice, price => price.variant, { eager: true }) productVariantPrices: ProductVariantPrice[]; @OneToMany(type => ProductVariantTranslation, translation => translation.base, { eager: true }) translations: Array<Translation<ProductVariant>>; @Index() @ManyToOne(type => Product, product => product.variants) product: Product; @EntityId({ nullable: true }) productId: ID; @Column({ default: 0 }) outOfStockThreshold: number; @Column({ default: true }) useGlobalOutOfStockThreshold: boolean; @Column({ type: 'varchar', default: GlobalFlag.INHERIT }) trackInventory: GlobalFlag; @OneToMany(type => StockLevel, stockLevel => stockLevel.productVariant) stockLevels: StockLevel[]; @OneToMany(type => StockMovement, stockMovement => stockMovement.productVariant) stockMovements: StockMovement[]; @ManyToMany(type => ProductOption, productOption => productOption.productVariants) @JoinTable() options: ProductOption[]; @ManyToMany(type => FacetValue, facetValue => facetValue.productVariants) @JoinTable() facetValues: FacetValue[]; @Column(type => CustomProductVariantFields) customFields: CustomProductVariantFields; @ManyToMany(type => Collection, collection => collection.productVariants) collections: Collection[]; @ManyToMany(type => Channel, channel => channel.productVariants) @JoinTable() channels: Channel[]; @OneToMany(type => OrderLine, orderLine => orderLine.productVariant) lines: OrderLine[];}