แก้apiข้อมูลหลัก
This commit is contained in:
parent
73e07dfed6
commit
6b78a365fa
26 changed files with 1816 additions and 988 deletions
41
src/entities/District.ts
Normal file
41
src/entities/District.ts
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import { Entity, Column, JoinColumn, ManyToOne, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { Province } from "./Province";
|
||||
import { SubDistrict } from "./SubDistrict";
|
||||
|
||||
@Entity("district")
|
||||
export class District extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เขต",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง province",
|
||||
})
|
||||
provinceId: string;
|
||||
|
||||
@ManyToOne(() => Province, (province) => province.districts)
|
||||
@JoinColumn({ name: "provinceId" })
|
||||
province: Province;
|
||||
|
||||
@OneToMany(() => SubDistrict, (subDistrict) => subDistrict.district)
|
||||
subDistricts: SubDistrict[];
|
||||
|
||||
@OneToMany(() => District, (district) => district.registrationDistricts)
|
||||
registrationDistricts: District[];
|
||||
|
||||
@OneToMany(() => District, (district) => district.currentDistricts)
|
||||
currentDistricts: District[];
|
||||
}
|
||||
|
||||
export class CreateDistrict {
|
||||
@Column()
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type UpdateDistrict = Partial<CreateDistrict>;
|
||||
|
|
@ -6,6 +6,7 @@ import { OrgChild1 } from "./OrgChild1";
|
|||
import { OrgChild2 } from "./OrgChild2";
|
||||
import { OrgChild3 } from "./OrgChild3";
|
||||
import { OrgChild4 } from "./OrgChild4";
|
||||
import { EmployeePosMaster } from "./EmployeePosMaster";
|
||||
|
||||
@Entity("orgRevision")
|
||||
export class OrgRevision extends EntityBase {
|
||||
|
|
@ -47,6 +48,9 @@ export class OrgRevision extends EntityBase {
|
|||
@OneToMany(() => PosMaster, (posMaster) => posMaster.orgRevision)
|
||||
posMasters: PosMaster[];
|
||||
|
||||
@OneToMany(() => EmployeePosMaster, (employeePosMaster) => employeePosMaster.orgRevision)
|
||||
employeePosMasters: EmployeePosMaster[];
|
||||
|
||||
@OneToMany(() => OrgRoot, (orgRoot) => orgRoot.orgRevision)
|
||||
orgRoots: OrgRoot[];
|
||||
|
||||
|
|
|
|||
|
|
@ -18,14 +18,20 @@ import { ProfileNopaid } from "./ProfileNopaid";
|
|||
import { ProfileOther } from "./ProfileOther";
|
||||
import { ProfileFamilyHistory } from "./ProfileFamily";
|
||||
import { ProfileGovernment } from "./ProfileGovernment";
|
||||
import { Gender } from "./Gender";
|
||||
import { Relationship } from "./Relationship";
|
||||
import { BloodGroup } from "./BloodGroup";
|
||||
import { Religion } from "./Religion";
|
||||
import { calculateRetireYear } from "../interfaces/utils";
|
||||
import { Province } from "./Province";
|
||||
import { SubDistrict } from "./SubDistrict";
|
||||
import { District } from "./District";
|
||||
|
||||
@Entity("profile")
|
||||
export class Profile extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ยศ",
|
||||
length: 40,
|
||||
default: null,
|
||||
})
|
||||
rank: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "คำนำหน้าชื่อ",
|
||||
|
|
@ -179,10 +185,7 @@ export class Profile extends EntityBase {
|
|||
length: 40,
|
||||
default: null,
|
||||
})
|
||||
genderId: string;
|
||||
|
||||
@ManyToOne(() => Gender, (v) => v.profile)
|
||||
gender: Gender;
|
||||
gender: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -190,10 +193,7 @@ export class Profile extends EntityBase {
|
|||
length: 40,
|
||||
default: null,
|
||||
})
|
||||
relationshipId: string;
|
||||
|
||||
@ManyToOne(() => Relationship, (v) => v.profile)
|
||||
relationship: Relationship;
|
||||
relationship: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -201,10 +201,7 @@ export class Profile extends EntityBase {
|
|||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
religionId: string;
|
||||
|
||||
@ManyToOne(() => Religion, (v) => v.profile)
|
||||
religion: Religion;
|
||||
religion: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -212,10 +209,7 @@ export class Profile extends EntityBase {
|
|||
length: 40,
|
||||
default: null,
|
||||
})
|
||||
bloodGroupId: string;
|
||||
|
||||
@ManyToOne(() => BloodGroup, (v) => v.profile)
|
||||
bloodGroup: BloodGroup;
|
||||
bloodGroup: string;
|
||||
|
||||
@OneToMany(() => PosMaster, (posMaster) => posMaster.current_holder)
|
||||
current_holders: PosMaster[];
|
||||
|
|
@ -282,6 +276,104 @@ export class Profile extends EntityBase {
|
|||
// calculateRetireYear(): number {
|
||||
// return calculateRetireYear(this.birthDate);
|
||||
// }
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ที่อยู่ตามทะเบียนบ้าน",
|
||||
default: null,
|
||||
length: 255,
|
||||
})
|
||||
registrationAddress: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "จังหวัดตามทะเบียนบ้าน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
registrationProvinceId: string;
|
||||
|
||||
@ManyToOne(() => Province, (v) => v.registrationProvinces)
|
||||
registrationProvince: Province;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เขตตามทะเบียนบ้าน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
registrationDistrictId: string;
|
||||
|
||||
@ManyToOne(() => District, (v) => v.registrationDistricts)
|
||||
registrationDistrict: District;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "แขวงตามทะเบียนบ้าน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
registrationSubDistrictId: string;
|
||||
|
||||
@ManyToOne(() => SubDistrict, (v) => v.registrationSubDistricts)
|
||||
registrationSubDistrict: SubDistrict;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "รหัสไปรษณีย์ตามทะเบียนบ้าน",
|
||||
default: null,
|
||||
length: 5,
|
||||
})
|
||||
registrationZipCode: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ที่อยู่ตามปัจจุบัน",
|
||||
default: null,
|
||||
length: 255,
|
||||
})
|
||||
currentAddress: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "จังหวัดตามปัจจุบัน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
currentProvinceId: string;
|
||||
|
||||
@ManyToOne(() => Province, (v) => v.currentProvinces)
|
||||
currentProvince: Province;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เขตตามปัจจุบัน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
currentDistrictId: string;
|
||||
|
||||
@ManyToOne(() => District, (v) => v.currentDistricts)
|
||||
currentDistrict: District;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "แขวงตามปัจจุบัน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
currentSubDistrictId: string;
|
||||
|
||||
@ManyToOne(() => SubDistrict, (v) => v.currentSubDistricts)
|
||||
currentSubDistrict: SubDistrict;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "รหัสไปรษณีย์ตามปัจจุบัน",
|
||||
default: null,
|
||||
length: 5,
|
||||
})
|
||||
currentZipCode: string;
|
||||
}
|
||||
|
||||
@Entity("profileHistory")
|
||||
|
|
@ -298,7 +390,120 @@ export class ProfileHistory extends Profile {
|
|||
profile: Profile;
|
||||
}
|
||||
|
||||
@Entity("profileAddressHistory")
|
||||
export class ProfileAddressHistory extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง ProfileInformation",
|
||||
default: null,
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ที่อยู่ตามทะเบียนบ้าน",
|
||||
default: null,
|
||||
length: 255,
|
||||
})
|
||||
registrationAddress: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "จังหวัดตามทะเบียนบ้าน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
registrationProvinceId: string;
|
||||
|
||||
@ManyToOne(() => Province, (v) => v.registrationProvinces)
|
||||
registrationProvince: Province;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เขตตามทะเบียนบ้าน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
registrationDistrictId: string;
|
||||
|
||||
@ManyToOne(() => District, (v) => v.registrationDistricts)
|
||||
registrationDistrict: District;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "แขวงตามทะเบียนบ้าน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
registrationSubDistrictId: string;
|
||||
|
||||
@ManyToOne(() => SubDistrict, (v) => v.registrationSubDistricts)
|
||||
registrationSubDistrict: SubDistrict;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "รหัสไปรษณีย์ตามทะเบียนบ้าน",
|
||||
default: null,
|
||||
length: 5,
|
||||
})
|
||||
registrationZipCode: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ที่อยู่ตามปัจจุบัน",
|
||||
default: null,
|
||||
length: 255,
|
||||
})
|
||||
currentAddress: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "จังหวัดตามปัจจุบัน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
currentProvinceId: string;
|
||||
|
||||
@ManyToOne(() => Province, (v) => v.currentProvinces)
|
||||
currentProvince: Province;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "เขตตามปัจจุบัน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
currentDistrictId: string;
|
||||
|
||||
@ManyToOne(() => District, (v) => v.currentDistricts)
|
||||
currentDistrict: District;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "แขวงตามปัจจุบัน",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
currentSubDistrictId: string;
|
||||
|
||||
@ManyToOne(() => SubDistrict, (v) => v.currentSubDistricts)
|
||||
currentSubDistrict: SubDistrict;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "รหัสไปรษณีย์ตามปัจจุบัน",
|
||||
default: null,
|
||||
length: 5,
|
||||
})
|
||||
currentZipCode: string;
|
||||
|
||||
@ManyToOne(() => Profile, (v) => v.histories, { onDelete: "CASCADE" })
|
||||
profile: Profile;
|
||||
}
|
||||
|
||||
export class CreateProfile {
|
||||
rank: string;
|
||||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
|
|
@ -312,15 +517,16 @@ export class CreateProfile {
|
|||
telephoneNumber: string | null;
|
||||
nationality: string | null;
|
||||
citizenId: string;
|
||||
religionId: string | null;
|
||||
religion: string | null;
|
||||
posLevelId: string | null;
|
||||
posTypeId: string | null;
|
||||
genderId: string | null;
|
||||
relationshipId: string | null;
|
||||
bloodGroupId: string | null;
|
||||
gender: string | null;
|
||||
relationship: string | null;
|
||||
bloodGroup: string | null;
|
||||
}
|
||||
|
||||
export type UpdateProfile = {
|
||||
rank?: string | null;
|
||||
prefix?: string | null;
|
||||
firstName?: string | null;
|
||||
lastName?: string | null;
|
||||
|
|
@ -335,10 +541,23 @@ export type UpdateProfile = {
|
|||
telephoneNumber?: string | null;
|
||||
nationality?: string | null;
|
||||
citizenId?: string | null;
|
||||
religionId: string | null;
|
||||
religion: string | null;
|
||||
posLevelId?: string | null;
|
||||
posTypeId?: string | null;
|
||||
genderId?: string | null;
|
||||
relationshipId?: string | null;
|
||||
bloodGroupId?: string | null;
|
||||
gender?: string | null;
|
||||
relationship?: string | null;
|
||||
bloodGroup?: string | null;
|
||||
};
|
||||
|
||||
export type UpdateProfileAddress = {
|
||||
registrationAddress?: string | null;
|
||||
registrationProvinceId?: string | null;
|
||||
registrationDistrictId?: string | null;
|
||||
registrationSubDistrictId?: string | null;
|
||||
registrationZipCode?: string | null;
|
||||
currentAddress?: string | null;
|
||||
currentProvinceId?: string | null;
|
||||
currentDistrictId?: string | null;
|
||||
currentSubDistrictId?: string | null;
|
||||
currentZipCode?: string | null;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -172,7 +172,6 @@ export class ProfileEducation extends EntityBase {
|
|||
|
||||
export class CreateProfileEducation {
|
||||
profileId: string | null;
|
||||
|
||||
country: string | null;
|
||||
degree: string | null;
|
||||
duration: string | null;
|
||||
|
|
|
|||
|
|
@ -5,13 +5,17 @@ import { EmployeePosType } from "./EmployeePosType";
|
|||
import { EmployeePosMaster } from "./EmployeePosMaster";
|
||||
import { ProfileSalaryEmployee } from "./ProfileSalaryEmployee";
|
||||
import { ProfileDisciplineEmployee } from "./ProfileDisciplineEmployee";
|
||||
import { BloodGroup } from "./BloodGroup";
|
||||
import { Relationship } from "./Relationship";
|
||||
import { Gender } from "./Gender";
|
||||
import { Religion } from "./Religion";
|
||||
|
||||
@Entity("profileEmployee")
|
||||
export class ProfileEmployee extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ยศ",
|
||||
length: 40,
|
||||
default: null,
|
||||
})
|
||||
rank: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "คำนำหน้าชื่อ",
|
||||
|
|
@ -147,10 +151,7 @@ export class ProfileEmployee extends EntityBase {
|
|||
length: 40,
|
||||
default: null,
|
||||
})
|
||||
genderId: string;
|
||||
|
||||
@ManyToOne(() => Gender, (v) => v.profileEmployee)
|
||||
gender: Gender;
|
||||
gender: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -158,10 +159,7 @@ export class ProfileEmployee extends EntityBase {
|
|||
length: 40,
|
||||
default: null,
|
||||
})
|
||||
relationshipId: string;
|
||||
|
||||
@ManyToOne(() => Relationship, (v) => v.profileEmployee)
|
||||
relationship: Relationship;
|
||||
relationship: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -169,10 +167,7 @@ export class ProfileEmployee extends EntityBase {
|
|||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
religionId: string;
|
||||
|
||||
@ManyToOne(() => Religion, (v) => v.profile)
|
||||
religion: Religion;
|
||||
religion: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -180,10 +175,7 @@ export class ProfileEmployee extends EntityBase {
|
|||
length: 40,
|
||||
default: null,
|
||||
})
|
||||
bloodGroupId: string;
|
||||
|
||||
@ManyToOne(() => BloodGroup, (v) => v.profileEmployee)
|
||||
bloodGroup: BloodGroup;
|
||||
bloodGroup: string;
|
||||
|
||||
@OneToMany(() => EmployeePosMaster, (v) => v.current_holder)
|
||||
current_holders: EmployeePosMaster[];
|
||||
|
|
@ -222,6 +214,7 @@ export class ProfileEmployeeHistory extends ProfileEmployee {
|
|||
}
|
||||
|
||||
export class CreateProfileEmployee {
|
||||
rank: string;
|
||||
prefix: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
|
|
@ -233,15 +226,16 @@ export class CreateProfileEmployee {
|
|||
ethnicity: string | null;
|
||||
telephoneNumber: string | null;
|
||||
citizenId: string;
|
||||
religionId: string | null;
|
||||
religion: string | null;
|
||||
posLevelId: string | null;
|
||||
posTypeId: string | null;
|
||||
genderId: string | null;
|
||||
relationshipId: string | null;
|
||||
bloodGroupId: string | null;
|
||||
gender: string | null;
|
||||
relationship: string | null;
|
||||
bloodGroup: string | null;
|
||||
}
|
||||
|
||||
export type UpdateProfileEmployee = {
|
||||
rank?: string | null;
|
||||
prefix?: string | null;
|
||||
firstName?: string | null;
|
||||
lastName?: string | null;
|
||||
|
|
@ -253,10 +247,10 @@ export type UpdateProfileEmployee = {
|
|||
ethnicity?: string | null;
|
||||
telephoneNumber?: string | null;
|
||||
citizenId?: string;
|
||||
religionId: string | null;
|
||||
religion: string | null;
|
||||
posLevelId?: string | null;
|
||||
posTypeId?: string | null;
|
||||
genderId?: string | null;
|
||||
relationshipId?: string | null;
|
||||
bloodGroupId?: string | null;
|
||||
gender?: string | null;
|
||||
relationship?: string | null;
|
||||
bloodGroup?: string | null;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ export type UpdateProfileInsignia = {
|
|||
section?: string | null;
|
||||
page?: string | null;
|
||||
receiveDate?: Date | null;
|
||||
insigniaId?: string | null;
|
||||
insigniaId?: string;
|
||||
insigniaType?: string | null;
|
||||
dateAnnounce?: Date | null;
|
||||
issue?: string | null;
|
||||
|
|
|
|||
|
|
@ -24,10 +24,18 @@ export class ProfileLeave extends EntityBase {
|
|||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
comment: "วัน เดือน ปี ที่ลา",
|
||||
comment: "วัน เดือน ปี ที่เริ่มลา",
|
||||
default: null,
|
||||
})
|
||||
dateLeave: Date;
|
||||
dateLeaveStart: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
comment: "วัน เดือน ปี ที่สิ้นสุดลา",
|
||||
default: null,
|
||||
})
|
||||
dateLeaveEnd: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -95,8 +103,9 @@ export class ProfileLeaveHistory extends ProfileLeave {
|
|||
|
||||
export class CreateProfileLeave {
|
||||
profileId: string | null;
|
||||
leaveTypeId: string | null;
|
||||
dateLeave: Date | null;
|
||||
leaveTypeId: string;
|
||||
dateLeaveStart: Date | null;
|
||||
dateLeaveEnd: Date | null;
|
||||
leaveDays: number | null;
|
||||
leaveCount: number | null;
|
||||
totalLeave: number | null;
|
||||
|
|
@ -105,8 +114,9 @@ export class CreateProfileLeave {
|
|||
}
|
||||
|
||||
export type UpdateProfileLeave = {
|
||||
leaveTypeId?: string | null;
|
||||
dateLeave?: Date | null;
|
||||
leaveTypeId?: string;
|
||||
dateLeaveStart?: Date | null;
|
||||
dateLeaveEnd?: Date | null;
|
||||
leaveDays?: number | null;
|
||||
leaveCount?: number | null;
|
||||
totalLeave?: number | null;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,6 +14,13 @@ import { ProfileSalary } from "./ProfileSalary";
|
|||
|
||||
@Entity("profileSalaryHistory")
|
||||
export class ProfileSalaryHistory extends EntityBase {
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง profile",
|
||||
type: "uuid",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
@Column({
|
||||
comment: "วันที่",
|
||||
type: "datetime",
|
||||
|
|
@ -21,6 +28,62 @@ export class ProfileSalaryHistory 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 ProfileSalaryHistory 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,17 @@ export class ProfileSalaryHistory 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;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง profileSalary",
|
||||
})
|
||||
profileSalaryId: string;
|
||||
|
||||
@ManyToOne(() => ProfileSalary, (profileSalary) => profileSalary.profileSalaryHistories)
|
||||
@JoinColumn({ name: "profileSalaryId" })
|
||||
|
|
@ -257,194 +136,34 @@ export class ProfileSalaryHistory extends EntityBase {
|
|||
}
|
||||
|
||||
export class CreateProfileSalaryHistory {
|
||||
@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 UpdateProfileSalaryHistory {
|
||||
@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 | 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;
|
||||
}
|
||||
|
|
|
|||
30
src/entities/Province.ts
Normal file
30
src/entities/Province.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { Entity, Column, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { District } from "./District";
|
||||
|
||||
@Entity("province")
|
||||
export class Province extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "จังหวัด",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@OneToMany(() => District, (district) => district.province)
|
||||
districts: District[];
|
||||
|
||||
@OneToMany(() => Province, (province) => province.registrationProvinces)
|
||||
registrationProvinces: Province[];
|
||||
|
||||
@OneToMany(() => Province, (province) => province.currentProvinces)
|
||||
currentProvinces: Province[];
|
||||
}
|
||||
|
||||
export class CreateProvince {
|
||||
@Column()
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type UpdateProvince = Partial<CreateProvince>;
|
||||
45
src/entities/SubDistrict.ts
Normal file
45
src/entities/SubDistrict.ts
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { District } from "./District";
|
||||
|
||||
@Entity("subDistrict")
|
||||
export class SubDistrict extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "แขวง",
|
||||
length: 255,
|
||||
default: null,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "รหัสไปรษณีย์",
|
||||
length: 10,
|
||||
default: null,
|
||||
})
|
||||
zipCode: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง district",
|
||||
})
|
||||
districtId: string;
|
||||
|
||||
@ManyToOne(() => District, (district) => district.subDistricts)
|
||||
@JoinColumn({ name: "districtId" })
|
||||
district: District;
|
||||
|
||||
@OneToMany(() => SubDistrict, (subDistrict) => subDistrict.registrationSubDistricts)
|
||||
registrationSubDistricts: SubDistrict[];
|
||||
|
||||
@OneToMany(() => SubDistrict, (subDistrict) => subDistrict.currentSubDistricts)
|
||||
currentSubDistricts: SubDistrict[];
|
||||
}
|
||||
|
||||
export class CreateSubDistrict {
|
||||
@Column()
|
||||
name: string;
|
||||
}
|
||||
|
||||
export type UpdateSubDistrict = Partial<CreateSubDistrict>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue