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