diff --git a/src/entity/goods.ts b/src/entity/goods.ts index 8f2b10c..d041420 100644 --- a/src/entity/goods.ts +++ b/src/entity/goods.ts @@ -6,12 +6,9 @@ import { UpdateDateColumn, DeleteDateColumn, Index, - ManyToOne, - JoinColumn, } from 'typeorm'; import { Status } from '../types/status'; -import { AssetCategory } from './asset_category'; @Entity('goods') export class Goods { @@ -51,10 +48,7 @@ export class Goods { }) quantity: number; - @ManyToOne(() => AssetCategory, (category) => category.goods, { nullable: true }) - @JoinColumn({ name: 'category_id' }) - category: AssetCategory; - + @Index() @Column({ nullable: true, type: 'uuid',