diff --git a/src/entity/request_orders.ts b/src/entity/request_orders.ts index b362958..f1d9333 100644 --- a/src/entity/request_orders.ts +++ b/src/entity/request_orders.ts @@ -8,12 +8,10 @@ import { Index, ManyToOne, JoinColumn, - OneToMany, } from 'typeorm'; import { User } from './users'; import { Supplier } from './supplier'; -import { Goods } from './goods'; export enum PurchasingMethod { PO = 'PO', // Purchase Order @@ -66,9 +64,12 @@ export class RequestOrder { }) requested_by: string; - @OneToMany(() => Goods, (goods) => goods.id, { nullable: false }) - @JoinColumn({ name: 'goods_ids' }) - goods: Goods[]; + @Column({ + nullable: false, + type: 'uuid', + array: true, + }) + goods_ids: string[]; @Column({ nullable: true,