57 lines
1.3 KiB
TypeScript
57 lines
1.3 KiB
TypeScript
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
|
import { EntityBase } from "./base/Base";
|
|
import { ProfileActposition } from "./ProfileActposition";
|
|
|
|
@Entity("profileActpositionHistory")
|
|
export class ProfileActpositionHistory extends EntityBase {
|
|
@Column({
|
|
nullable: true,
|
|
type: "datetime",
|
|
comment: "วันที่เริ่มต้น",
|
|
default: null,
|
|
})
|
|
dateStart: Date;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
type: "datetime",
|
|
comment: "วันที่สิ้นสุด",
|
|
default: null,
|
|
})
|
|
dateEnd: Date;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "ตำแหน่งเลขที่",
|
|
default: null,
|
|
})
|
|
posNo: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "ตำแหน่ง",
|
|
default: null,
|
|
})
|
|
position: string;
|
|
|
|
@Column({
|
|
comment: "สถานะ",
|
|
default: false,
|
|
})
|
|
status: boolean;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
length: 40,
|
|
comment: "คีย์นอก(FK)ของตาราง ProfileActposition",
|
|
default: null,
|
|
})
|
|
profileActpositionId: string;
|
|
|
|
@ManyToOne(
|
|
() => ProfileActposition,
|
|
(profileActposition) => profileActposition.profileActpositionHistorys,
|
|
)
|
|
@JoinColumn({ name: "profileActpositionId" })
|
|
histories: ProfileActposition;
|
|
}
|