remove unecessary relations
This commit is contained in:
@ -10,9 +10,7 @@ import {
|
||||
Index,
|
||||
} from 'typeorm';
|
||||
|
||||
import { Supplier } from './supplier';
|
||||
import { RequestOrder } from './request_orders';
|
||||
import { Department } from './department';
|
||||
|
||||
@Entity('goods_receipts')
|
||||
export class GoodsReceipt {
|
||||
@ -41,20 +39,6 @@ export class GoodsReceipt {
|
||||
})
|
||||
request_order_id: string;
|
||||
|
||||
@ManyToOne(() => Supplier, (supplier) => supplier.id, { nullable: false })
|
||||
@JoinColumn({ name: 'supplier_id' })
|
||||
supplier: Supplier;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
type: 'uuid',
|
||||
})
|
||||
supplier_id: string;
|
||||
|
||||
@ManyToOne(() => Department, (department) => department.id, { nullable: false })
|
||||
@JoinColumn({ name: 'department_id' })
|
||||
department: Department;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
type: 'uuid',
|
||||
|
||||
@ -10,8 +10,6 @@ import {
|
||||
JoinColumn,
|
||||
} from 'typeorm';
|
||||
|
||||
import { User } from './users';
|
||||
import { Supplier } from './supplier';
|
||||
|
||||
export enum PurchasingMethod {
|
||||
PO = 'PO', // Purchase Order
|
||||
@ -43,20 +41,6 @@ export class RequestOrder {
|
||||
})
|
||||
total_amount: number;
|
||||
|
||||
@ManyToOne(() => Supplier, (supplier) => supplier.id, { nullable: false })
|
||||
@JoinColumn({ name: 'supplier_id' })
|
||||
supplier: Supplier;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
type: 'uuid',
|
||||
})
|
||||
supplier_id: string;
|
||||
|
||||
@ManyToOne(() => User, (user) => user.id, { nullable: false })
|
||||
@JoinColumn({ name: 'requested_by' })
|
||||
requestedBy: User;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
nullable: false,
|
||||
|
||||
Reference in New Issue
Block a user