update add branch
This commit is contained in:
@ -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 { Branch } from './branchs';
|
||||
|
||||
@Entity('log_pulls')
|
||||
export class LogPull {
|
||||
@ -25,6 +26,15 @@ export class LogPull {
|
||||
})
|
||||
branch_code: string;
|
||||
|
||||
@ManyToOne(() => Branch, { onDelete: "RESTRICT" })
|
||||
@JoinColumn({ name: 'branch_code' })
|
||||
branch: Branch
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
position_date: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 32
|
||||
|
||||
Reference in New Issue
Block a user