diff --git a/src/entity/goods.ts b/src/entity/goods.ts index a668564..67ebea6 100644 --- a/src/entity/goods.ts +++ b/src/entity/goods.ts @@ -88,6 +88,10 @@ export class Goods { @ManyToOne(() => Supplier, { nullable: false }) @JoinColumn({ name: 'supplier_id' }) supplier: Supplier; + + @ManyToOne(() => GoodsReceipt, (goodsReceipt) => goodsReceipt.goods, { nullable: true }) + @JoinColumn({ name: 'goods_receipt_id' }) + goodsReceipt: GoodsReceipt; @Column({ nullable: false,