add tables
This commit is contained in:
parent
277bd39510
commit
a46c942e1c
4 changed files with 158 additions and 2 deletions
34
src/entities/ProfileEmployeeEmploymentHistory.ts
Normal file
34
src/entities/ProfileEmployeeEmploymentHistory.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { ProfileEmployeeEmployment } from "./ProfileEmployeeEmployment"
|
||||
|
||||
@Entity("profileEmployeeEmploymentHistory")
|
||||
export class ProfileEmployeeEmploymentHistory extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
comment: "วันที่จ้าง",
|
||||
default: null,
|
||||
})
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "คำสั่งจ้าง",
|
||||
default: null,
|
||||
})
|
||||
command: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง ProfileEmployeeEmployment",
|
||||
default: null,
|
||||
})
|
||||
profileEmployeeEmploymentId: string;
|
||||
|
||||
@ManyToOne(() => ProfileEmployeeEmployment, (v) => v.histories)
|
||||
@JoinColumn({ name: "profileEmployeeEmploymentId" })
|
||||
profileEmployeeEmployment: ProfileEmployeeEmployment;
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue