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