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

291 lines
6.3 KiB
TypeScript

import { Entity, Column, JoinColumn, ManyToOne, Double } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileSalary } from "./ProfileSalary";
import { Command } from "./Command";
@Entity("profileSalaryHistory")
export class ProfileSalaryHistory extends EntityBase {
@Column({
nullable: true,
comment: "เรียงลำดับใหมาตามการนำเข้า",
default: null,
})
order: number;
@Column({
nullable: true,
comment: "เลขที่คำสั่ง",
default: null,
})
commandNo: string;
@Column({
nullable: true,
comment: "ปีที่ออกคำสั่ง",
default: null,
})
commandYear: number;
@Column({
comment: "คำสั่งวันที่",
type: "datetime",
nullable: true,
})
commandDateSign: Date;
@Column({
comment: "คำสั่งมีผลวันที่",
type: "datetime",
nullable: true,
})
commandDateAffect: Date;
@Column({
nullable: true,
comment: "รหัสประเภทของคำสั่ง",
default: null,
})
commandCode: string;
@Column({
nullable: true,
comment: "ชื่อประเภทคำสั่ง",
default: null,
})
commandName: string;
@Column({
nullable: true,
length: 40,
comment: "ตัวย่อเลขที่ตำแหน่ง",
default: null,
})
posNoAbb: string;
@Column({
nullable: true,
length: 40,
comment: "เลขที่ตำแหน่ง",
default: null,
})
posNo: string;
@Column({
nullable: true,
length: 255,
comment: "ตำแหน่ง",
default: null,
})
positionName: string;
@Column({
nullable: true,
length: 255,
comment: "ประเภทตำแหน่ง",
default: null,
})
positionType: string;
@Column({
nullable: true,
length: 255,
comment: "ระดับตำแหน่ง",
default: null,
})
positionLevel: string;
@Column({
nullable: true,
comment: "ระดับของเก่าที่ยังไม่เทียบเท่าแบบแท่ง",
default: null,
})
positionCee: string;
@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: "ตำแหน่งทางการบริหาร",
default: null,
})
positionExecutive: string;
@Column({
comment: "เงินเดือนฐาน",
default: 0,
nullable: true,
type: "double",
})
amount: Double;
@Column({
comment: "เงินพิเศษ",
default: 0,
nullable: true,
type: "double",
})
amountSpecial: Double;
@Column({
comment: "เงินประจำตำแหน่ง",
default: 0,
nullable: true,
type: "double",
})
positionSalaryAmount: Double;
@Column({
comment: "เงินค่าตอบแทนรายเดือน",
default: 0,
nullable: true,
type: "double",
})
mouthSalaryAmount: Double;
@Column({
nullable: true,
type: "text",
comment: "หมายเหตุ",
default: null,
})
remark: string;
@Column({
comment: "วันที่",
type: "datetime",
nullable: true,
})
dateGovernment: Date;
@Column({
nullable: true,
comment: "เข้ารับราชการ",
default: null,
})
isGovernment: boolean;
@Column({
length: 40,
comment: "คีย์นอก(FK)ของตาราง profileSalary",
})
profileSalaryId: string;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง command",
default: null,
})
commandId: string;
@Column({
nullable: true,
length: 255,
comment: "หน่วยงานที่ออกคำสั่ง",
default: null,
})
posNumCodeSit: string;
@Column({
nullable: true,
length: 255,
comment: "หน่วยงานที่ออกคำสั่ง(ตัวย่อ)",
default: null,
})
posNumCodeSitAbb: string;
@ManyToOne(() => Command, (command) => command.profileSalaryHistorys)
@JoinColumn({ name: "commandId" })
command: Command;
@ManyToOne(() => ProfileSalary, (profileSalary) => profileSalary.profileSalaryHistories)
@JoinColumn({ name: "profileSalaryId" })
histories: ProfileSalary;
}
export class CreateProfileSalaryHistory {
profileId: string;
date?: Date | null;
amount?: Double | null;
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;
orgRoot?: string | null;
orgChild1?: string | null;
orgChild2?: string | null;
orgChild3?: string | null;
orgChild4?: string | null;
positionCee?: string | null;
commandCode?: string | null;
commandName?: string | null;
}
export class UpdateProfileSalaryHistory {
date?: Date | null;
amount?: Double | null;
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;
orgRoot?: string | null;
orgChild1?: string | null;
orgChild2?: string | null;
orgChild3?: string | null;
orgChild4?: string | null;
positionCee?: string | null;
commandCode?: string | null;
commandName?: string | null;
}