72 lines
1.9 KiB
TypeScript
72 lines
1.9 KiB
TypeScript
import { Entity, Column, OneToMany, JoinColumn, ManyToOne, Double } from "typeorm";
|
|
import { EntityBase } from "./base/Base";
|
|
import { Profile } from "./Profile";
|
|
import { ProfileEmployee } from "./ProfileEmployee";
|
|
import { Command } from "./Command";
|
|
import { ProfileSalary } from "./ProfileSalary";
|
|
|
|
@Entity("positionSalaryEditHistory")
|
|
export class PositionSalaryEditHistory extends EntityBase {
|
|
@Column({
|
|
nullable: true,
|
|
length: 40,
|
|
comment: "คีย์นอก(FK)ของตาราง profile",
|
|
type: "uuid",
|
|
default: null,
|
|
})
|
|
profileId: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
length: 40,
|
|
comment: "คีย์นอก(FK)ของตาราง profileEmployee",
|
|
type: "uuid",
|
|
default: null,
|
|
})
|
|
profileEmployeeId: string;
|
|
|
|
@Column({
|
|
comment: "วันที่ตีกลับ",
|
|
type: "datetime",
|
|
nullable: true,
|
|
})
|
|
returnedDate: Date;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "ชื่อผู้ตรวจสอบ",
|
|
default: null,
|
|
})
|
|
examinerName: string;
|
|
|
|
@Column({
|
|
nullable: true,
|
|
comment: "รายละเอียดที่แจ้งให้แก้ไข",
|
|
default: null,
|
|
})
|
|
detailForEdit: number;
|
|
|
|
@ManyToOne(() => Profile, (profile) => profile.positionSalaryEditHistory)
|
|
@JoinColumn({ name: "profileId" })
|
|
profile: Profile;
|
|
|
|
@ManyToOne(() => ProfileEmployee, (profileEmployee) => profileEmployee.positionSalaryEditHistory)
|
|
@JoinColumn({ name: "profileEmployeeId" })
|
|
profileEmployee: ProfileEmployee;
|
|
|
|
}
|
|
|
|
export class CreatePositionSalaryEditHistory {
|
|
profileId: string | null;
|
|
returnedDate: Date;
|
|
examinerName: string | null;
|
|
detailForEdit: string | null;
|
|
}
|
|
|
|
export class CreatePositionSalaryEditHistoryEmp {
|
|
profileEmployeeId: string | null;
|
|
returnedDate: Date;
|
|
examinerName: string | null;
|
|
detailForEdit: string | null;
|
|
}
|
|
|