แก้apiข้อมูลหลัก

This commit is contained in:
Kittapath 2024-03-26 23:07:55 +07:00
parent 73e07dfed6
commit 6b78a365fa
26 changed files with 1816 additions and 988 deletions

View file

@ -14,6 +14,13 @@ import { ProfileSalaryHistory } from "./ProfileSalaryHistory";
@Entity("profileSalary")
export class ProfileSalary extends EntityBase {
@Column({
length: 40,
comment: "คีย์นอก(FK)ของตาราง profile",
type: "uuid",
})
profileId: string;
@Column({
comment: "วันที่",
type: "datetime",
@ -21,6 +28,62 @@ export class ProfileSalary extends EntityBase {
})
date: Date;
@Column({
nullable: true,
length: 40,
comment: "เลขที่ตำแหน่ง",
default: null,
})
posNo: string;
@Column({
nullable: true,
length: 255,
comment: "ตำแหน่ง",
default: null,
})
position: string;
@Column({
nullable: true,
length: 255,
comment: "สายงาน",
default: null,
})
positionLine: string;
@Column({
nullable: true,
length: 255,
comment: "ด้าน/สาขา",
default: null,
})
positionPathSide: string;
@Column({
nullable: true,
length: 255,
comment: "ตำแหน่งทางการบริหาร",
default: null,
})
positionExecutive: string;
@Column({
nullable: true,
length: 255,
comment: "ประเภทตำแหน่ง",
default: null,
})
positionType: string;
@Column({
nullable: true,
length: 255,
comment: "ระดับตำแหน่ง",
default: null,
})
positionLevel: string;
@Column({
comment: "เงินเดือนฐาน",
default: 0,
@ -45,180 +108,9 @@ export class ProfileSalary extends EntityBase {
})
mouthSalaryAmount: Double;
@Column({
length: 40,
comment: "คีย์นอก(FK)ของตาราง profile",
type: "uuid",
})
profileId: string;
@Column({
comment: "สถานะการใช้งาน",
default: false,
})
isActive: boolean;
@Column({
nullable: true,
comment: "ตำแหน่ง (รายละเอียด)",
type: "text",
default: null,
})
salaryClass: string;
@Column({
nullable: true,
comment: "เอกสารอ้างอิง",
type: "text",
default: null,
})
salaryRef: string;
@Column({
nullable: true,
length: 40,
comment: "Id เลขที่ตำแหน่ง",
type: "uuid",
default: null,
})
posNoId: string;
@Column({
nullable: true,
length: 40,
comment: "Id เลขที่ตำแหน่ง",
type: "uuid",
default: null,
})
positionId: string;
@Column({
nullable: true,
length: 40,
comment: "Id สังกัด",
type: "uuid",
default: null,
})
ocId: string;
@Column({
nullable: true,
length: 40,
comment: "Id ตำแหน่งทางการบริหาร",
type: "uuid",
default: null,
})
positionExecutiveId: string;
@Column({
nullable: true,
length: 40,
comment: "Id ด้านทางการบริหาร",
type: "uuid",
default: null,
})
positionExecutiveSideId: string;
@Column({
nullable: true,
length: 40,
comment: "",
type: "uuid",
default: null,
})
positionLevelId: string;
@Column({
nullable: true,
length: 40,
comment: "Id สายงาน",
type: "uuid",
default: null,
})
positionLineId: string;
@Column({
nullable: true,
length: 40,
comment: "Id ด้าน/สาขา",
type: "uuid",
default: null,
})
positionPathSideId: string;
@Column({
nullable: true,
length: 40,
comment: "Id ประเภทตำแหน่ง",
type: "uuid",
default: null,
})
positionTypeId: string;
@Column({
nullable: true,
length: 40,
comment: "Id ชื่อย่อหน่วยงาน",
type: "uuid",
default: null,
})
organizationShortNameId: string;
@Column({
nullable: true,
length: 40,
comment: "Id กลุ่มงาน",
type: "uuid",
default: null,
})
positionEmployeeGroupId: string;
@Column({
nullable: true,
length: 40,
comment: "Id ระดับชั้นงาน",
type: "uuid",
default: null,
})
positionEmployeeLevelId: string;
@Column({
nullable: true,
length: 40,
comment: "Id ตำแหน่ง",
type: "uuid",
default: null,
})
positionEmployeePositionId: string;
@Column({
nullable: true,
length: 40,
comment: "Id ด้านของตำแหน่ง",
type: "uuid",
default: null,
})
positionEmployeePositionSideId: string;
@Column({
nullable: true,
length: 40,
comment: "Id เลขที่ตำแหน่งลูกจ้าง",
default: null,
})
posNoEmployee: string;
@Column({
nullable: true,
type: "datetime",
comment: "เอกสารอ้างอิง (ลงวันที่)",
default: null,
})
refCommandDate: Date;
@Column({
nullable: true,
comment: "เอกสารอ้างอิง (เลขที่คำสั่ง)",
comment: "เลขที่คำสั่ง",
type: "text",
default: null,
})
@ -226,30 +118,11 @@ export class ProfileSalary extends EntityBase {
@Column({
nullable: true,
comment: "ลำดับ",
default: null,
})
order: number;
@Column({
comment: "เลขที่คำสั่ง",
type: "text",
})
commandNo: string;
@Column({
comment: "ประเภทคำสั่ง",
type: "text",
})
commandTypeName: string;
@Column({
nullable: true,
comment: "ประเภทตำแหน่งกรณีพิเศษ",
comment: "เอกสารอ้างอิง",
type: "text",
default: null,
})
salaryStatus: string;
templateDoc: string;
@OneToMany(() => ProfileSalaryHistory, (profileSalaryHistory) => profileSalaryHistory.histories)
profileSalaryHistories: ProfileSalaryHistory[];
@ -260,194 +133,34 @@ export class ProfileSalary extends EntityBase {
}
export class CreateProfileSalary {
@Column({
type: "datetime",
})
date: Date;
@Column({
type: "double",
})
amount: Double;
@Column({
type: "double",
})
positionSalaryAmount: Double;
@Column({
type: "double",
})
mouthSalaryAmount: Double;
@Column({
type: "uuid",
})
profileId: string;
// @Column()
// isActive: boolean;
// @Column()
// salaryClass: string | null;
// @Column()
// salaryRef: string | null;
// @Column("uuid")
// posNoId: string | null;
// @Column("uuid")
// positionId: string | null;
// @Column("uuid")
// ocId: string | null;
// @Column("uuid")
// positionExecutiveId : string | null;
// @Column("uuid")
// positionExecutiveSideId : string | null;
// @Column("uuid")
// positionLevelId : string | null;
// @Column("uuid")
// positionLineId : string | null;
// @Column("uuid")
// positionPathSideId : string | null;
// @Column("uuid")
// positionTypeId : string | null;
// @Column("uuid")
// organizationShortNameId : string | null;
// @Column("uuid")
// positionEmployeeGroupId : string | null;
// @Column("uuid")
// positionEmployeeLevelId : string | null;
// @Column("uuid")
// positionEmployeePositionId : string | null;
// @Column("uuid")
// positionEmployeePositionSideId : string | null;
// @Column()
// posNoEmployee : string | null;
// @Column()
// refCommandDate: Date | null;
// @Column()
// refCommandNo: string | null;
// @Column()
// order: number | null;
// @Column()
// commandNo: string;
// @Column()
// commandTypeName: string;
// @Column()
// salaryStatus: 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 class UpdateProfileSalary {
@Column({
type: "datetime",
})
date: Date;
@Column({
type: "double",
})
amount: Double;
@Column({
type: "double",
})
positionSalaryAmount: Double;
@Column({
type: "double",
})
mouthSalaryAmount: Double;
// @Column()
// isActive: boolean;
// @Column()
// salaryClass: string;
// @Column()
// salaryRef: string;
// @Column("uuid")
// posNoId: string;
// @Column("uuid")
// positionId: string;
// @Column("uuid")
// ocId: string;
// @Column("uuid")
// positionExecutiveId : string;
// @Column("uuid")
// positionExecutiveSideId : string;
// @Column("uuid")
// positionLevelId : string;
// @Column("uuid")
// positionLineId : string;
// @Column("uuid")
// positionPathSideId : string;
// @Column("uuid")
// positionTypeId : string;
// @Column("uuid")
// organizationShortNameId : string;
// @Column("uuid")
// positionEmployeeGroupId : string;
// @Column("uuid")
// positionEmployeeLevelId : string;
// @Column("uuid")
// positionEmployeePositionId : string;
// @Column("uuid")
// positionEmployeePositionSideId : string;
// @Column()
// posNoEmployee : string;
// @Column()
// refCommandDate: Date;
// @Column()
// refCommandNo: string;
// @Column()
// order: number;
// @Column()
// commandNo: string;
// @Column()
// commandTypeName: string;
// @Column()
// salaryStatus: string;
}
export type UpdateProfileSalary = {
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;
};