product-bundle.entity.ts 595 B

1234567891011121314151617181920
  1. import { DeepPartial } from '@vendure/common/lib/shared-types';
  2. import { VendureEntity, Product, EntityId, ID, ProductVariant } from '@vendure/core';
  3. import { Column, Entity, ManyToOne, OneToMany } from 'typeorm';
  4. import { ProductBundleItem } from './product-bundle-item.entity';
  5. @Entity()
  6. export class ProductBundle extends VendureEntity {
  7. constructor(input?: DeepPartial<ProductBundle>) {
  8. super(input);
  9. }
  10. @OneToMany(type => ProductBundleItem, item => item.bundle)
  11. items: ProductBundleItem[];
  12. @Column()
  13. name: string;
  14. @Column()
  15. description: string;
  16. }