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

276 lines
5.9 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 {
@Column({
nullable: true,
comment: "เรียงลำดับใหมาตามการนำเข้า",
default: null,
2024-03-13 10:43:50 +07:00
})
order: number;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
comment: "เลขที่คำสั่ง",
2024-03-13 10:43:50 +07:00
default: null,
})
2025-02-24 17:17:21 +07:00
commandNo: string;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
comment: "ปีที่ออกคำสั่ง",
2024-03-13 10:43:50 +07:00
default: null,
})
commandYear: number;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
comment: "คำสั่งวันที่",
type: "datetime",
2024-03-13 10:43:50 +07:00
nullable: true,
})
commandDateSign: Date;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
comment: "คำสั่งมีผลวันที่",
type: "datetime",
2024-03-13 10:43:50 +07:00
nullable: true,
})
commandDateAffect: Date;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
comment: "รหัสประเภทของคำสั่ง",
2024-03-13 10:43:50 +07:00
default: null,
})
commandCode: string;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
comment: "ชื่อประเภทคำสั่ง",
2024-03-13 10:43:50 +07:00
default: null,
})
commandName: string;
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,
})
posNoAbb: string;
2024-03-13 10:52:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
length: 40,
comment: "เลขที่ตำแหน่ง",
default: null,
2024-03-13 10:43:50 +07:00
})
posNo: string;
2024-03-13 10:43:50 +07:00
2024-12-10 09:49:41 +07:00
@Column({
nullable: true,
length: 255,
comment: "ตำแหน่ง",
default: null,
2024-12-10 09:49:41 +07:00
})
positionName: string;
2024-12-10 09:49:41 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
length: 255,
comment: "ประเภทตำแหน่ง",
default: null,
2024-03-13 10:43:50 +07:00
})
positionType: string;
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
length: 255,
comment: "ระดับตำแหน่ง",
default: null,
2024-03-13 10:43:50 +07:00
})
positionLevel: string;
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
comment: "ระดับของเก่าที่ยังไม่เทียบเท่าแบบแท่ง",
default: null,
})
positionCee: string;
2025-01-08 14:15:28 +07:00
@Column({
nullable: true,
comment: "root name",
default: null,
})
orgRoot: string;
@Column({
nullable: true,
comment: "child1 name",
default: null,
})
orgChild1: string;
@Column({
nullable: true,
comment: "child2 name",
default: null,
})
orgChild2: string;
@Column({
nullable: true,
comment: "child3 name",
default: null,
})
orgChild3: string;
@Column({
nullable: true,
comment: "child4 name",
default: null,
})
orgChild4: string;
@Column({
nullable: true,
length: 255,
comment: "ตำแหน่งทางการบริหาร",
2025-01-08 14:15:28 +07:00
default: null,
})
positionExecutive: string;
2025-01-08 14:15:28 +07:00
@Column({
comment: "เงินเดือนฐาน",
default: 0,
2025-01-08 14:15:28 +07:00
nullable: true,
type: "double",
2025-01-08 14:15:28 +07:00
})
amount: Double;
2025-01-08 14:15:28 +07:00
@Column({
comment: "เงินพิเศษ",
default: 0,
2025-01-08 14:15:28 +07:00
nullable: true,
type: "double",
2025-01-08 14:15:28 +07:00
})
amountSpecial: Double;
2025-01-08 14:15: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
})
positionSalaryAmount: Double;
2024-03-13 10:43:50 +07:00
2025-01-08 14:15:28 +07:00
@Column({
comment: "เงินค่าตอบแทนรายเดือน",
default: 0,
2025-01-08 14:15:28 +07:00
nullable: true,
type: "double",
2025-01-08 14:15:28 +07:00
})
mouthSalaryAmount: Double;
2025-01-08 14:15:28 +07:00
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
length: 255,
comment: "หมายเหตุ",
default: null,
2024-03-13 10:43:50 +07:00
})
remark: string;
2024-03-13 10:43:50 +07:00
@Column({
comment: "วันที่",
type: "datetime",
nullable: true,
2024-03-13 10:43:50 +07:00
})
dateGovernment: Date;
2024-03-13 10:43:50 +07:00
@Column({
nullable: true,
comment: "เข้ารับราชการ",
default: null,
})
isGovernment: boolean;
@Column({
length: 40,
comment: "คีย์นอก(FK)ของตาราง profileSalary",
})
profileSalaryId: string;
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;
remark: string | null;
2025-01-08 14:15:28 +07:00
orgRoot?: string | null;
orgChild1?: string | null;
orgChild2?: string | null;
orgChild3?: string | null;
orgChild4?: string | null;
positionCee?: string | null;
commandCode?: string | null;
commandName?: 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;
remark?: string | null;
2025-01-08 14:15:28 +07:00
orgRoot?: string | null;
orgChild1?: string | null;
orgChild2?: string | null;
orgChild3?: string | null;
orgChild4?: string | null;
positionCee?: string | null;
commandCode?: string | null;
commandName?: string | null;
2024-03-13 10:43:50 +07:00
}