Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2024-05-14 11:55:36 +07:00
commit e1db0a0a73
5 changed files with 191 additions and 3 deletions

View file

@ -10,6 +10,7 @@ import {
} from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
import { ProfileSalaryHistory } from "./ProfileSalaryHistory";
@Entity("profileSalary")
@ -21,6 +22,14 @@ export class ProfileSalary extends EntityBase {
})
profileId: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง ProfileEmployee",
default: null,
})
profileEmployeeId: string;
@Column({
comment: "วันที่",
type: "datetime",
@ -137,6 +146,10 @@ export class ProfileSalary extends EntityBase {
@ManyToOne(() => Profile, (profile) => profile.profileSalary)
@JoinColumn({ name: "profileId" })
profile: Profile;
@ManyToOne(() => ProfileEmployee, (ProfileEmployee) => ProfileEmployee.profileSalary)
@JoinColumn({ name: "profileEmployeeId" })
profileEmployee: ProfileEmployee;
}
export class CreateProfileSalary {
@ -156,6 +169,23 @@ export class CreateProfileSalary {
templateDoc: string | null;
}
export class CreateProfileSalaryEmployee {
profileEmployeeId: string | null;
date?: Date | null;
amount?: Double | null;
positionSalaryAmount?: Double | null;
mouthSalaryAmount?: Double | null;
posNo: string | null;
position: string | null;
positionLine: string | null;
positionPathSide: string | null;
positionExecutive: string | null;
positionType: string | null;
positionLevel: string | null;
refCommandNo: string | null;
templateDoc: string | null;
}
export type UpdateProfileSalary = {
date?: Date | null;
amount?: Double | null;