update add branch

This commit is contained in:
2024-12-30 15:37:15 +07:00
parent 591c5722cf
commit 30465de07d

View File

@ -1,6 +1,7 @@
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToOne, JoinColumn } from 'typeorm'; import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToOne, JoinColumn, ManyToOne } from 'typeorm';
import { LogPullType, StatusLogPull } from '../types/pull'; import { LogPullType, StatusLogPull } from '../types/pull';
import { Branch } from './branchs';
@Entity('log_pulls') @Entity('log_pulls')
export class LogPull { export class LogPull {
@ -25,6 +26,15 @@ export class LogPull {
}) })
branch_code: string; branch_code: string;
@ManyToOne(() => Branch, { onDelete: "RESTRICT" })
@JoinColumn({ name: 'branch_code' })
branch: Branch
@Column({
nullable: true,
})
position_date: Date;
@Column({ @Column({
nullable: true, nullable: true,
length: 32 length: 32