update relation from request order with goods id
This commit is contained in:
@ -8,12 +8,10 @@ import {
|
|||||||
Index,
|
Index,
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
JoinColumn,
|
JoinColumn,
|
||||||
OneToMany,
|
|
||||||
} from 'typeorm';
|
} from 'typeorm';
|
||||||
|
|
||||||
import { User } from './users';
|
import { User } from './users';
|
||||||
import { Supplier } from './supplier';
|
import { Supplier } from './supplier';
|
||||||
import { Goods } from './goods';
|
|
||||||
|
|
||||||
export enum PurchasingMethod {
|
export enum PurchasingMethod {
|
||||||
PO = 'PO', // Purchase Order
|
PO = 'PO', // Purchase Order
|
||||||
@ -66,9 +64,12 @@ export class RequestOrder {
|
|||||||
})
|
})
|
||||||
requested_by: string;
|
requested_by: string;
|
||||||
|
|
||||||
@OneToMany(() => Goods, (goods) => goods.id, { nullable: false })
|
@Column({
|
||||||
@JoinColumn({ name: 'goods_ids' })
|
nullable: false,
|
||||||
goods: Goods[];
|
type: 'uuid',
|
||||||
|
array: true,
|
||||||
|
})
|
||||||
|
goods_ids: string[];
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user