add positionSalaryEditHistory entitiy
This commit is contained in:
parent
b01f074afe
commit
0ab8aa4f8b
3 changed files with 80 additions and 0 deletions
72
src/entities/PositionSalaryEditHistory.ts
Normal file
72
src/entities/PositionSalaryEditHistory.ts
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
@ -48,6 +48,7 @@ import { RoleKeycloak } from "./RoleKeycloak";
|
|||
import { ProfileActposition } from "./ProfileActposition";
|
||||
import { ProfileAssistance } from "./ProfileAssistance";
|
||||
import { ProfileSalaryTemp } from "./ProfileSalaryTemp";
|
||||
import { PositionSalaryEditHistory } from "./PositionSalaryEditHistory";
|
||||
|
||||
@Entity("profile")
|
||||
export class Profile extends EntityBase {
|
||||
|
|
@ -518,6 +519,9 @@ export class Profile extends EntityBase {
|
|||
@OneToMany(() => StateUserComment, (v) => v.profile)
|
||||
stateUserComments: StateUserComment[];
|
||||
|
||||
@OneToMany(() => PositionSalaryEditHistory, (v) => v.profile)
|
||||
positionSalaryEditHistory: PositionSalaryEditHistory[];
|
||||
|
||||
@ManyToOne(() => PosLevel, (posLevel) => posLevel.profiles)
|
||||
@JoinColumn({ name: "posLevelId" })
|
||||
posLevel: PosLevel;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ import { RoleKeycloak } from "./RoleKeycloak";
|
|||
import { StateOperatorUser } from "./StateOperatorUser";
|
||||
import { EmployeeTempPosMaster } from "./EmployeeTempPosMaster";
|
||||
import { ProfileSalaryTemp } from "./ProfileSalaryTemp";
|
||||
import { PositionSalaryEditHistory } from "./PositionSalaryEditHistory";
|
||||
|
||||
@Entity("profileEmployee")
|
||||
export class ProfileEmployee extends EntityBase {
|
||||
|
|
@ -778,6 +779,9 @@ export class ProfileEmployee extends EntityBase {
|
|||
|
||||
@OneToMany(() => StateOperatorUser, (v) => v.profile)
|
||||
stateOperatorUsers: StateOperatorUser[];
|
||||
|
||||
@OneToMany(() => PositionSalaryEditHistory, (v) => v.profileEmployee)
|
||||
positionSalaryEditHistory: PositionSalaryEditHistory[];
|
||||
|
||||
//ที่อยู่
|
||||
@Column({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue