remove goods relations with goods receipt
This commit is contained in:
@ -14,7 +14,7 @@ import { Status } from '../types/status';
|
|||||||
import { User } from './users';
|
import { User } from './users';
|
||||||
import { Supplier } from './supplier';
|
import { Supplier } from './supplier';
|
||||||
import { AssetCategory } from './asset_category';
|
import { AssetCategory } from './asset_category';
|
||||||
import { GoodsReceipt } from './goods_receipt';
|
|
||||||
@Entity('goods')
|
@Entity('goods')
|
||||||
export class Goods {
|
export class Goods {
|
||||||
@PrimaryGeneratedColumn('uuid')
|
@PrimaryGeneratedColumn('uuid')
|
||||||
@ -89,10 +89,6 @@ export class Goods {
|
|||||||
@JoinColumn({ name: 'supplier_id' })
|
@JoinColumn({ name: 'supplier_id' })
|
||||||
supplier: Supplier;
|
supplier: Supplier;
|
||||||
|
|
||||||
@ManyToOne(() => GoodsReceipt, (goodsReceipt) => goodsReceipt.goods, { nullable: true })
|
|
||||||
@JoinColumn({ name: 'goods_receipt_id' })
|
|
||||||
goodsReceipt: GoodsReceipt;
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
type: 'uuid',
|
type: 'uuid',
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import { User } from './users';
|
|||||||
import { Supplier } from './supplier';
|
import { Supplier } from './supplier';
|
||||||
import { RequestOrder } from './request_orders';
|
import { RequestOrder } from './request_orders';
|
||||||
import { Department } from './department';
|
import { Department } from './department';
|
||||||
import { Goods } from './goods';
|
|
||||||
|
|
||||||
@Entity('goods_receipts')
|
@Entity('goods_receipts')
|
||||||
export class GoodsReceipt {
|
export class GoodsReceipt {
|
||||||
@ -64,9 +63,6 @@ export class GoodsReceipt {
|
|||||||
})
|
})
|
||||||
department_id: string;
|
department_id: string;
|
||||||
|
|
||||||
@OneToMany(() => Goods, (goods) => goods.goodsReceipt, { cascade: true })
|
|
||||||
goods: Goods[];
|
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: 'text',
|
type: 'text',
|
||||||
|
|||||||
Reference in New Issue
Block a user