update relation from request order with goods id
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user