From c5e81adcbd2d40b4ee06264c87b80a9ece9ad6ac Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Sun, 15 Dec 2024 13:35:11 +0700 Subject: [PATCH] update entity --- src/entity/lnkolek.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/entity/lnkolek.ts b/src/entity/lnkolek.ts index b4726ca..5aa7e61 100644 --- a/src/entity/lnkolek.ts +++ b/src/entity/lnkolek.ts @@ -1,5 +1,6 @@ import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne } from 'typeorm'; import { Product } from './products'; +import { Branch } from './branchs'; @Entity('lnkolek') export class LNKOLEK { @@ -10,6 +11,10 @@ export class LNKOLEK { @JoinColumn() product: Product + @ManyToOne(() => Branch, { onDelete: "RESTRICT" }) + @JoinColumn() + branch: Branch + @Column({ type: 'float', nullable: false