updated appoint & sen data to command

This commit is contained in:
Warunee Tamkoo 2024-10-25 12:35:47 +07:00
parent 736a2f7940
commit fd42120b9d
6 changed files with 1574 additions and 1429 deletions

View file

@ -1,11 +1,4 @@
import {
Entity,
Column,
PrimaryGeneratedColumn,
OneToOne,
JoinColumn,
OneToMany,
} from "typeorm";
import { Entity, Column, PrimaryGeneratedColumn, OneToOne, JoinColumn, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { Assign } from "./Assign";
@ -55,8 +48,7 @@ export class Personal extends EntityBase {
@Column({
type: Boolean,
comment:
"สถานะการทดลองงาน 1 คืออยู่ระหว่างการทดลองงาน, 0 คือไม่อยู่ระหว่างการทดลองงาน",
comment: "สถานะการทดลองงาน 1 คืออยู่ระหว่างการทดลองงาน, 0 คือไม่อยู่ระหว่างการทดลองงาน",
default: 0,
})
isProbation: number;
@ -109,6 +101,21 @@ export class Personal extends EntityBase {
})
idcard: string;
@Column({ nullable: true, comment: "id หน่วยงาน root", default: null })
root: string;
@Column({ nullable: true, comment: "id หน่วยงาน child1", default: null })
child1: string;
@Column({ nullable: true, comment: "id หน่วยงาน child2", default: null })
child2: string;
@Column({ nullable: true, comment: "id หน่วยงาน child3", default: null })
child3: string;
@Column({ nullable: true, comment: "id หน่วยงาน child4", default: null })
child4: string;
@OneToMany(() => Assign, (assign: Assign) => assign.personal_id)
@JoinColumn({ name: "personal_id" })
assign: Assign[];