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 { ProfileActposition } from "./ProfileActposition";
|
||||||
import { ProfileAssistance } from "./ProfileAssistance";
|
import { ProfileAssistance } from "./ProfileAssistance";
|
||||||
import { ProfileSalaryTemp } from "./ProfileSalaryTemp";
|
import { ProfileSalaryTemp } from "./ProfileSalaryTemp";
|
||||||
|
import { PositionSalaryEditHistory } from "./PositionSalaryEditHistory";
|
||||||
|
|
||||||
@Entity("profile")
|
@Entity("profile")
|
||||||
export class Profile extends EntityBase {
|
export class Profile extends EntityBase {
|
||||||
|
|
@ -518,6 +519,9 @@ export class Profile extends EntityBase {
|
||||||
@OneToMany(() => StateUserComment, (v) => v.profile)
|
@OneToMany(() => StateUserComment, (v) => v.profile)
|
||||||
stateUserComments: StateUserComment[];
|
stateUserComments: StateUserComment[];
|
||||||
|
|
||||||
|
@OneToMany(() => PositionSalaryEditHistory, (v) => v.profile)
|
||||||
|
positionSalaryEditHistory: PositionSalaryEditHistory[];
|
||||||
|
|
||||||
@ManyToOne(() => PosLevel, (posLevel) => posLevel.profiles)
|
@ManyToOne(() => PosLevel, (posLevel) => posLevel.profiles)
|
||||||
@JoinColumn({ name: "posLevelId" })
|
@JoinColumn({ name: "posLevelId" })
|
||||||
posLevel: PosLevel;
|
posLevel: PosLevel;
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ import { RoleKeycloak } from "./RoleKeycloak";
|
||||||
import { StateOperatorUser } from "./StateOperatorUser";
|
import { StateOperatorUser } from "./StateOperatorUser";
|
||||||
import { EmployeeTempPosMaster } from "./EmployeeTempPosMaster";
|
import { EmployeeTempPosMaster } from "./EmployeeTempPosMaster";
|
||||||
import { ProfileSalaryTemp } from "./ProfileSalaryTemp";
|
import { ProfileSalaryTemp } from "./ProfileSalaryTemp";
|
||||||
|
import { PositionSalaryEditHistory } from "./PositionSalaryEditHistory";
|
||||||
|
|
||||||
@Entity("profileEmployee")
|
@Entity("profileEmployee")
|
||||||
export class ProfileEmployee extends EntityBase {
|
export class ProfileEmployee extends EntityBase {
|
||||||
|
|
@ -779,6 +780,9 @@ export class ProfileEmployee extends EntityBase {
|
||||||
@OneToMany(() => StateOperatorUser, (v) => v.profile)
|
@OneToMany(() => StateOperatorUser, (v) => v.profile)
|
||||||
stateOperatorUsers: StateOperatorUser[];
|
stateOperatorUsers: StateOperatorUser[];
|
||||||
|
|
||||||
|
@OneToMany(() => PositionSalaryEditHistory, (v) => v.profileEmployee)
|
||||||
|
positionSalaryEditHistory: PositionSalaryEditHistory[];
|
||||||
|
|
||||||
//ที่อยู่
|
//ที่อยู่
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue