瀏覽代碼

chore(core): Remove unused entity

Michael Bromley 6 年之前
父節點
當前提交
5fdcb80c06
共有 2 個文件被更改,包括 0 次插入36 次删除
  1. 0 1
      packages/core/src/entity/index.ts
  2. 0 35
      packages/core/src/entity/shipping-item/shipping-item.entity.ts

+ 0 - 1
packages/core/src/entity/index.ts

@@ -33,7 +33,6 @@ export * from './role/role.entity';
 export * from './session/session.entity';
 export * from './session/anonymous-session.entity';
 export * from './session/authenticated-session.entity';
-export * from './shipping-item/shipping-item.entity';
 export * from './shipping-method/shipping-method.entity';
 export * from './tax-category/tax-category.entity';
 export * from './tax-rate/tax-rate.entity';

+ 0 - 35
packages/core/src/entity/shipping-item/shipping-item.entity.ts

@@ -1,35 +0,0 @@
-import { Adjustment, AdjustmentType } from '@vendure/common/lib/generated-types';
-import { DeepPartial } from '@vendure/common/lib/shared-types';
-import { Column, Entity, ManyToOne } from 'typeorm';
-
-import { Calculated } from '../../common/calculated-decorator';
-import { VendureEntity } from '../base/base.entity';
-import { OrderLine } from '../order-line/order-line.entity';
-import { ShippingMethod } from '../shipping-method/shipping-method.entity';
-
-@Entity()
-export class ShippingItem extends VendureEntity {
-    constructor(input?: DeepPartial<ShippingItem>) {
-        super(input);
-    }
-
-    @Column() price: number;
-
-    @Column('simple-json') pendingAdjustments: Adjustment[];
-
-    @ManyToOne(type => ShippingMethod)
-    shippingMethod: ShippingMethod;
-
-    @Calculated()
-    get adjustments(): Adjustment[] {
-        return this.pendingAdjustments;
-    }
-
-    clearAdjustments(type?: AdjustmentType) {
-        if (!type) {
-            this.pendingAdjustments = [];
-        } else {
-            this.pendingAdjustments = this.pendingAdjustments.filter(a => a.type !== type);
-        }
-    }
-}