hrms-api-org/src/entities/ProfileSalaryHistory.ts

190 lines
4.2 KiB
TypeScript
Raw Normal View History

2024-10-07 14:53:27 +07:00
import { Entity, Column, JoinColumn, ManyToOne, Double } from "typeorm";
2024-03-13 10:43:50 +07:00
import { EntityBase } from "./base/Base";
import { ProfileSalary } from "./ProfileSalary";
2024-10-18 16:11:22 +07:00
import { Command } from "./Command";
2024-03-13 10:43:50 +07:00
@Entity("profileSalaryHistory")
export class ProfileSalaryHistory extends EntityBase {
2024-05-17 09:41:02 +07:00
// @Column({
// length: 40,
// comment: "คีย์นอก(FK)ของตาราง profile",
// type: "uuid",
// })
// profileId: string;
2024-03-13 10:43:50 +07:00
@Column({
comment: "วันที่",
type: "datetime",
2024-03-13 10:43:50 +07:00
nullable: true,
})
date: Date;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
length: 40,
comment: "เลขที่ตำแหน่ง",
2024-03-13 10:43:50 +07:00
default: null,
})
posNo: string;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
length: 255,
comment: "ตำแหน่ง",
2024-03-13 10:43:50 +07:00
default: null,
})
position: string;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
length: 255,
comment: "สายงาน",
2024-03-13 10:43:50 +07:00
default: null,
})
positionLine: string;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
length: 255,
comment: "ด้าน/สาขา",
2024-03-13 10:43:50 +07:00
default: null,
})
positionPathSide: string;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
length: 255,
comment: "ตำแหน่งทางการบริหาร",
2024-03-13 10:43:50 +07:00
default: null,
})
positionExecutive: string;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
length: 255,
comment: "ประเภทตำแหน่ง",
2024-03-13 10:43:50 +07:00
default: null,
})
positionType: string;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
length: 255,
comment: "ระดับตำแหน่ง",
2024-03-13 10:43:50 +07:00
default: null,
})
positionLevel: string;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
comment: "เงินเดือนฐาน",
default: 0,
2024-03-13 10:43:50 +07:00
nullable: true,
type: "double",
2024-03-13 10:43:50 +07:00
})
amount: Double;
2024-03-13 10:43:50 +07:00
2024-12-10 09:49:41 +07:00
@Column({
comment: "เงินพิเศษ",
default: 0,
nullable: true,
type: "double",
})
amountSpecial: Double;
2024-03-13 10:43:50 +07:00
@Column({
comment: "เงินประจำตำแหน่ง",
default: 0,
2024-03-13 10:43:50 +07:00
nullable: true,
type: "double",
2024-03-13 10:43:50 +07:00
})
positionSalaryAmount: Double;
2024-03-13 10:43:50 +07:00
@Column({
comment: "เงินค่าตอบแทนรายเดือน",
default: 0,
2024-03-13 10:43:50 +07:00
nullable: true,
type: "double",
2024-03-13 10:43:50 +07:00
})
mouthSalaryAmount: Double;
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
comment: "เลขที่คำสั่ง",
2024-03-13 10:43:50 +07:00
type: "text",
default: null,
})
refCommandNo: string;
@Column({
nullable: true,
comment: "เอกสารอ้างอิง",
2024-03-13 10:43:50 +07:00
type: "text",
default: null,
2024-03-13 10:43:50 +07:00
})
templateDoc: string;
2024-03-13 10:43:50 +07:00
@Column({
length: 40,
comment: "คีย์นอก(FK)ของตาราง profileSalary",
2024-03-13 10:43:50 +07:00
})
profileSalaryId: string;
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
comment: "ลำดับตำแหน่ง",
default: null,
})
order: number;
2024-10-18 16:11:22 +07:00
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง command",
default: null,
})
commandId: string;
@ManyToOne(() => Command, (command) => command.profileSalaryHistorys)
@JoinColumn({ name: "commandId" })
command: Command;
2024-03-13 10:43:50 +07:00
@ManyToOne(() => ProfileSalary, (profileSalary) => profileSalary.profileSalaryHistories)
@JoinColumn({ name: "profileSalaryId" })
histories: ProfileSalary;
}
export class CreateProfileSalaryHistory {
profileId: string;
date?: Date | null;
amount?: Double | null;
2024-12-10 09:49:41 +07:00
amountSpecial?: 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;
2024-03-13 10:43:50 +07:00
}
export class UpdateProfileSalaryHistory {
date?: Date | null;
amount?: Double | null;
2024-12-10 09:49:41 +07:00
amountSpecial?: 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;
2024-03-13 10:43:50 +07:00
}