update entity

This commit is contained in:
2024-12-15 13:35:11 +07:00
parent b90699a405
commit c5e81adcbd

View File

@ -1,5 +1,6 @@
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne } from 'typeorm'; import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne } from 'typeorm';
import { Product } from './products'; import { Product } from './products';
import { Branch } from './branchs';
@Entity('lnkolek') @Entity('lnkolek')
export class LNKOLEK { export class LNKOLEK {
@ -10,6 +11,10 @@ export class LNKOLEK {
@JoinColumn() @JoinColumn()
product: Product product: Product
@ManyToOne(() => Branch, { onDelete: "RESTRICT" })
@JoinColumn()
branch: Branch
@Column({ @Column({
type: 'float', type: 'float',
nullable: false nullable: false