Merge branch 'develop' into adiDev
This commit is contained in:
commit
e64dbf20ce
27 changed files with 270 additions and 422 deletions
|
|
@ -269,6 +269,7 @@ export class EmployeePositionController extends Controller {
|
||||||
findData = await this.employeePosDictRepository.find({
|
findData = await this.employeePosDictRepository.find({
|
||||||
where: { posDictName: Like(`%${keyword}%`) },
|
where: { posDictName: Like(`%${keyword}%`) },
|
||||||
relations: ["posType", "posLevel"],
|
relations: ["posType", "posLevel"],
|
||||||
|
order: { posLevel: { posLevelName: "ASC" } },
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -280,6 +281,7 @@ export class EmployeePositionController extends Controller {
|
||||||
findData = await this.employeePosDictRepository.find({
|
findData = await this.employeePosDictRepository.find({
|
||||||
where: { posTypeId: In(findEmpTypes.map((x) => x.id)) },
|
where: { posTypeId: In(findEmpTypes.map((x) => x.id)) },
|
||||||
relations: ["posType", "posLevel"],
|
relations: ["posType", "posLevel"],
|
||||||
|
order: { posLevel: { posLevelName: "ASC" } },
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -291,11 +293,13 @@ export class EmployeePositionController extends Controller {
|
||||||
findData = await this.employeePosDictRepository.find({
|
findData = await this.employeePosDictRepository.find({
|
||||||
where: { posLevelId: In(findEmpLevels.map((x) => x.id)) },
|
where: { posLevelId: In(findEmpLevels.map((x) => x.id)) },
|
||||||
relations: ["posType", "posLevel"],
|
relations: ["posType", "posLevel"],
|
||||||
|
order: { posLevel: { posLevelName: "ASC" } },
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
//กรณีเลือกค้นหาจาก"ระดับชั้นงาน" แต่กรอกไม่ใช่ number ให้ปล่อยมาหมดเลย
|
//กรณีเลือกค้นหาจาก"ระดับชั้นงาน" แต่กรอกไม่ใช่ number ให้ปล่อยมาหมดเลย
|
||||||
findData = await this.employeePosDictRepository.find({
|
findData = await this.employeePosDictRepository.find({
|
||||||
relations: ["posType", "posLevel"],
|
relations: ["posType", "posLevel"],
|
||||||
|
order: { posLevel: { posLevelName: "ASC" } },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -303,6 +307,7 @@ export class EmployeePositionController extends Controller {
|
||||||
default:
|
default:
|
||||||
findData = await this.employeePosDictRepository.find({
|
findData = await this.employeePosDictRepository.find({
|
||||||
relations: ["posType", "posLevel"],
|
relations: ["posType", "posLevel"],
|
||||||
|
order: { posLevel: { posLevelName: "ASC" } },
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,8 @@ export class PositionController extends Controller {
|
||||||
requestBody: CreatePosDictExe,
|
requestBody: CreatePosDictExe,
|
||||||
@Request() request: { user: Record<string, any> },
|
@Request() request: { user: Record<string, any> },
|
||||||
) {
|
) {
|
||||||
let posDict: any;
|
// let posDict: PosDict;
|
||||||
|
let posDict: any = new PosDict();
|
||||||
posDict.posDictName = requestBody.posDictName;
|
posDict.posDictName = requestBody.posDictName;
|
||||||
posDict.posDictField = requestBody.posDictField;
|
posDict.posDictField = requestBody.posDictField;
|
||||||
posDict.posTypeId = requestBody.posTypeId;
|
posDict.posTypeId = requestBody.posTypeId;
|
||||||
|
|
@ -182,7 +183,7 @@ export class PositionController extends Controller {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล PosLevelId");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล PosLevelId");
|
||||||
}
|
}
|
||||||
|
|
||||||
let posExecutive: any = null;
|
let posExecutive: any = new PosExecutive();
|
||||||
if (requestBody.posExecutive != null && requestBody.posExecutive != "") {
|
if (requestBody.posExecutive != null && requestBody.posExecutive != "") {
|
||||||
const checkName = await this.posExecutiveRepository.findOne({
|
const checkName = await this.posExecutiveRepository.findOne({
|
||||||
where: { posExecutiveName: requestBody.posExecutive },
|
where: { posExecutiveName: requestBody.posExecutive },
|
||||||
|
|
@ -192,8 +193,11 @@ export class PositionController extends Controller {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ชื่อนี้มีอยู่ในระบบแล้ว");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ชื่อนี้มีอยู่ในระบบแล้ว");
|
||||||
}
|
}
|
||||||
posExecutive.posExecutiveName = requestBody.posExecutive;
|
posExecutive.posExecutiveName = requestBody.posExecutive;
|
||||||
|
|
||||||
const checkPriority = await this.posExecutiveRepository.findOne({
|
const checkPriority = await this.posExecutiveRepository.findOne({
|
||||||
|
select: ["posExecutivePriority"],
|
||||||
|
where: {
|
||||||
|
posExecutivePriority: Not(IsNull()),
|
||||||
|
},
|
||||||
order: { posExecutivePriority: "DESC" },
|
order: { posExecutivePriority: "DESC" },
|
||||||
});
|
});
|
||||||
if (checkPriority == null) {
|
if (checkPriority == null) {
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ export class ProfileEducationsController extends Controller {
|
||||||
educationLevelId: "string",
|
educationLevelId: "string",
|
||||||
positionPath: "string",
|
positionPath: "string",
|
||||||
positionPathId: "string",
|
positionPathId: "string",
|
||||||
|
note: "string",
|
||||||
isDate: true,
|
isDate: true,
|
||||||
isEducation: true,
|
isEducation: true,
|
||||||
},
|
},
|
||||||
|
|
@ -113,6 +114,7 @@ export class ProfileEducationsController extends Controller {
|
||||||
educationLevelId: "string",
|
educationLevelId: "string",
|
||||||
positionPath: "string",
|
positionPath: "string",
|
||||||
positionPathId: "string",
|
positionPathId: "string",
|
||||||
|
note: "string",
|
||||||
isDate: true,
|
isDate: true,
|
||||||
isEducation: true,
|
isEducation: true,
|
||||||
profileEducationId: "f6c693b4-1a9b-4fbe-95c5-ed4da50d35b6",
|
profileEducationId: "f6c693b4-1a9b-4fbe-95c5-ed4da50d35b6",
|
||||||
|
|
@ -142,6 +144,7 @@ export class ProfileEducationsController extends Controller {
|
||||||
educationLevelId: "string",
|
educationLevelId: "string",
|
||||||
positionPath: "string",
|
positionPath: "string",
|
||||||
positionPathId: "string",
|
positionPathId: "string",
|
||||||
|
note: "string",
|
||||||
isDate: true,
|
isDate: true,
|
||||||
isEducation: true,
|
isEducation: true,
|
||||||
profileEducationId: "f6c693b4-1a9b-4fbe-95c5-ed4da50d35b6",
|
profileEducationId: "f6c693b4-1a9b-4fbe-95c5-ed4da50d35b6",
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ export class ProfileHonorController extends Controller {
|
||||||
issuer: "issuer",
|
issuer: "issuer",
|
||||||
refCommandDate: "2024-03-12T10:10:31.000Z",
|
refCommandDate: "2024-03-12T10:10:31.000Z",
|
||||||
refCommandNo: "refCommandNo",
|
refCommandNo: "refCommandNo",
|
||||||
|
isDate: true,
|
||||||
profileHonorId: "debfa8a7-83fb-4801-a940-8ae74e7638d3",
|
profileHonorId: "debfa8a7-83fb-4801-a940-8ae74e7638d3",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -93,6 +94,7 @@ export class ProfileHonorController extends Controller {
|
||||||
issuer: "string",
|
issuer: "string",
|
||||||
refCommandDate: "2024-03-12T10:09:47.000Z",
|
refCommandDate: "2024-03-12T10:09:47.000Z",
|
||||||
refCommandNo: "string",
|
refCommandNo: "string",
|
||||||
|
isDate: true,
|
||||||
profileHonorId: "debfa8a7-83fb-4801-a940-8ae74e7638d3",
|
profileHonorId: "debfa8a7-83fb-4801-a940-8ae74e7638d3",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ export class ProfileInsigniaController extends Controller {
|
||||||
volumeNo: "string",
|
volumeNo: "string",
|
||||||
refCommandDate: "2024-03-12T10:05:02.000Z",
|
refCommandDate: "2024-03-12T10:05:02.000Z",
|
||||||
refCommandNo: "string",
|
refCommandNo: "string",
|
||||||
|
note: "string",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
@ -96,6 +97,7 @@ export class ProfileInsigniaController extends Controller {
|
||||||
volumeNo: "volumeNo",
|
volumeNo: "volumeNo",
|
||||||
refCommandDate: "2024-03-12T10:05:44.000Z",
|
refCommandDate: "2024-03-12T10:05:44.000Z",
|
||||||
refCommandNo: "refCommandNo",
|
refCommandNo: "refCommandNo",
|
||||||
|
note: "string",
|
||||||
profileInsigniaId: "c9d4dd52-25f5-491a-852d-28bfe00d66cb",
|
profileInsigniaId: "c9d4dd52-25f5-491a-852d-28bfe00d66cb",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -120,6 +122,7 @@ export class ProfileInsigniaController extends Controller {
|
||||||
volumeNo: "string",
|
volumeNo: "string",
|
||||||
refCommandDate: "2024-03-12T10:05:02.000Z",
|
refCommandDate: "2024-03-12T10:05:02.000Z",
|
||||||
refCommandNo: "string",
|
refCommandNo: "string",
|
||||||
|
note: "string",
|
||||||
profileInsigniaId: "c9d4dd52-25f5-491a-852d-28bfe00d66cb",
|
profileInsigniaId: "c9d4dd52-25f5-491a-852d-28bfe00d66cb",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ export class ProfileTrainingController extends Controller {
|
||||||
duration: "string",
|
duration: "string",
|
||||||
name: "string",
|
name: "string",
|
||||||
yearly: 0,
|
yearly: 0,
|
||||||
|
isDate: true,
|
||||||
profileTrainingId: "3cf02fb7-2f0c-471b-b641-51d557375c0a",
|
profileTrainingId: "3cf02fb7-2f0c-471b-b641-51d557375c0a",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -112,6 +113,7 @@ export class ProfileTrainingController extends Controller {
|
||||||
duration: "string",
|
duration: "string",
|
||||||
name: "name",
|
name: "name",
|
||||||
yearly: 0,
|
yearly: 0,
|
||||||
|
isDate: true,
|
||||||
profileTrainingId: "3cf02fb7-2f0c-471b-b641-51d557375c0a",
|
profileTrainingId: "3cf02fb7-2f0c-471b-b641-51d557375c0a",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export class ProfileAbility extends EntityBase {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "หมายเหตุ",
|
comment: "หมายเหตุ",
|
||||||
|
|
@ -67,7 +67,10 @@ export class ProfileAbility extends EntityBase {
|
||||||
})
|
})
|
||||||
field: string;
|
field: string;
|
||||||
|
|
||||||
@OneToMany(() => ProfileAbilityHistory, (profileAbilityHistory) => profileAbilityHistory.histories)
|
@OneToMany(
|
||||||
|
() => ProfileAbilityHistory,
|
||||||
|
(profileAbilityHistory) => profileAbilityHistory.histories,
|
||||||
|
)
|
||||||
profileAbilityHistorys: ProfileAbilityHistory[];
|
profileAbilityHistorys: ProfileAbilityHistory[];
|
||||||
|
|
||||||
@ManyToOne(() => Profile, (profile) => profile.profileAbilities)
|
@ManyToOne(() => Profile, (profile) => profile.profileAbilities)
|
||||||
|
|
@ -76,29 +79,23 @@ export class ProfileAbility extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileAbility {
|
export class CreateProfileAbility {
|
||||||
@Column("uuid")
|
|
||||||
profileId: string | null;
|
profileId: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column()
|
|
||||||
remark: string | null;
|
remark: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
detail: string | null;
|
detail: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
reference: string | null;
|
reference: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateStart: Date | null;
|
dateStart: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateEnd: Date | null;
|
dateEnd: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
field: string | null;
|
field: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileAbility = Partial<CreateProfileAbility>;
|
export type UpdateProfileAbility = {
|
||||||
|
profileId: string | null;
|
||||||
|
isActive: boolean;
|
||||||
|
remark: string | null;
|
||||||
|
detail: string | null;
|
||||||
|
reference: string | null;
|
||||||
|
dateStart?: Date | null;
|
||||||
|
dateEnd?: Date | null;
|
||||||
|
field: string | null;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,12 @@ import { ProfileAbility } from "./ProfileAbility";
|
||||||
|
|
||||||
@Entity("profileAbilityHistory")
|
@Entity("profileAbilityHistory")
|
||||||
export class ProfileAbilityHistory extends EntityBase {
|
export class ProfileAbilityHistory extends EntityBase {
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะการใช้งาน",
|
comment: "สถานะการใช้งาน",
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "หมายเหตุ",
|
comment: "หมายเหตุ",
|
||||||
|
|
@ -72,32 +71,3 @@ export class ProfileAbilityHistory extends EntityBase {
|
||||||
@JoinColumn({ name: "profileAbilityId" })
|
@JoinColumn({ name: "profileAbilityId" })
|
||||||
histories: ProfileAbility;
|
histories: ProfileAbility;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileAbilityHistory {
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
remark: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
detail: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
reference: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateStart: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateEnd: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
field: string | null;
|
|
||||||
|
|
||||||
@Column("uuid")
|
|
||||||
ProfileAbilityId: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type UpdateProfileAbilityHistory = Partial<CreateProfileAbilityHistory>;
|
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,11 @@ export class ProfileAssessment extends EntityBase {
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ชื่อแบบประเมิน",
|
comment: "ชื่อแบบประเมิน",
|
||||||
type: "text",
|
type: "text",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
|
|
@ -83,7 +83,10 @@ export class ProfileAssessment extends EntityBase {
|
||||||
})
|
})
|
||||||
pointSumTotal: number;
|
pointSumTotal: number;
|
||||||
|
|
||||||
@OneToMany(() => ProfileAssessmentHistory, (profileAssessmentHistory) => profileAssessmentHistory.histories)
|
@OneToMany(
|
||||||
|
() => ProfileAssessmentHistory,
|
||||||
|
(profileAssessmentHistory) => profileAssessmentHistory.histories,
|
||||||
|
)
|
||||||
profileAssessmentHistorys: ProfileAssessmentHistory[];
|
profileAssessmentHistorys: ProfileAssessmentHistory[];
|
||||||
|
|
||||||
@ManyToOne(() => Profile, (profile) => profile.profileAssessments)
|
@ManyToOne(() => Profile, (profile) => profile.profileAssessments)
|
||||||
|
|
@ -92,35 +95,27 @@ export class ProfileAssessment extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileAssessment {
|
export class CreateProfileAssessment {
|
||||||
@Column("uuid")
|
|
||||||
profileId: string | null;
|
profileId: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column()
|
|
||||||
name: string | null;
|
name: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
date: Date | null;
|
date: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
point1: number | null;
|
point1: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
point1Total: number | null;
|
point1Total: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
point2: number | null;
|
point2: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
point2Total: number | null;
|
point2Total: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
pointSum: number | null;
|
pointSum: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
pointSumTotal: number | null;
|
pointSumTotal: number | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileAssessment = Partial<CreateProfileAssessment>;
|
export type UpdateProfileAssessment = {
|
||||||
|
profileId: string | null;
|
||||||
|
isActive: boolean;
|
||||||
|
name: string | null;
|
||||||
|
date?: Date | null;
|
||||||
|
point1: number | null;
|
||||||
|
point1Total: number | null;
|
||||||
|
point2: number | null;
|
||||||
|
point2Total: number | null;
|
||||||
|
pointSum: number | null;
|
||||||
|
pointSumTotal: number | null;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { ProfileAssessment } from "./ProfileAssessment";
|
||||||
|
|
||||||
@Entity("profileAssessmentHistory")
|
@Entity("profileAssessmentHistory")
|
||||||
export class ProfileAssessmentHistory extends EntityBase {
|
export class ProfileAssessmentHistory extends EntityBase {
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะการใช้งาน",
|
comment: "สถานะการใช้งาน",
|
||||||
default: false,
|
default: false,
|
||||||
|
|
@ -15,11 +14,11 @@ export class ProfileAssessmentHistory extends EntityBase {
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ชื่อแบบประเมิน",
|
comment: "ชื่อแบบประเมิน",
|
||||||
type: "text",
|
type: "text",
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
|
|
@ -83,43 +82,11 @@ export class ProfileAssessmentHistory extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
profileAssessmentId: string;
|
profileAssessmentId: string;
|
||||||
|
|
||||||
@ManyToOne(() => ProfileAssessment, (profileAssessment) => profileAssessment.profileAssessmentHistorys)
|
@ManyToOne(
|
||||||
|
() => ProfileAssessment,
|
||||||
|
(profileAssessment) => profileAssessment.profileAssessmentHistorys,
|
||||||
|
)
|
||||||
@JoinColumn({ name: "profileAssessmentId" })
|
@JoinColumn({ name: "profileAssessmentId" })
|
||||||
histories: ProfileAssessment;
|
histories: ProfileAssessment;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileAssessmentHistory {
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
name: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
date: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
point1: number | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
point1Total: number | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
point2: number | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
point2Total: number | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
pointSum: number | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
pointSumTotal: number | null;
|
|
||||||
|
|
||||||
@Column("uuid")
|
|
||||||
profileAssessmentId: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type UpdateProfileAssessmentHistory = Partial<CreateProfileAssessmentHistory>;
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ export class ProfileDiscipline extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
detail: string;
|
detail: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
|
|
@ -66,7 +66,10 @@ export class ProfileDiscipline extends EntityBase {
|
||||||
})
|
})
|
||||||
unStigma: string;
|
unStigma: string;
|
||||||
|
|
||||||
@OneToMany(() => ProfileDisciplineHistory, (profileDisciplineHistory) => profileDisciplineHistory.histories)
|
@OneToMany(
|
||||||
|
() => ProfileDisciplineHistory,
|
||||||
|
(profileDisciplineHistory) => profileDisciplineHistory.histories,
|
||||||
|
)
|
||||||
profileDisciplineHistories: ProfileDisciplineHistory[];
|
profileDisciplineHistories: ProfileDisciplineHistory[];
|
||||||
|
|
||||||
@ManyToOne(() => Profile, (profile) => profile.profileDiscipline)
|
@ManyToOne(() => Profile, (profile) => profile.profileDiscipline)
|
||||||
|
|
@ -75,30 +78,23 @@ export class ProfileDiscipline extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileDiscipline {
|
export class CreateProfileDiscipline {
|
||||||
|
|
||||||
@Column()
|
|
||||||
date: Date | null;
|
date: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
profileId: string;
|
profileId: string;
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean | null;
|
isActive: boolean | null;
|
||||||
|
level: string | null;
|
||||||
@Column()
|
|
||||||
level: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
detail: string | null;
|
detail: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandDate: Date | null;
|
refCommandDate: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandNo: string | null;
|
refCommandNo: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
unStigma: string | null;
|
unStigma: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileDiscipline = Partial<CreateProfileDiscipline>;
|
export type UpdateProfileDiscipline = {
|
||||||
|
date?: Date | null;
|
||||||
|
profileId: string;
|
||||||
|
isActive: boolean | null;
|
||||||
|
level: string | null;
|
||||||
|
detail: string | null;
|
||||||
|
refCommandDate?: Date | null;
|
||||||
|
refCommandNo: string | null;
|
||||||
|
unStigma: string | null;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -76,29 +76,23 @@ export class ProfileDuty extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileDuty {
|
export class CreateProfileDuty {
|
||||||
@Column("uuid")
|
|
||||||
profileId: string | null;
|
profileId: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateStart: Date | null;
|
dateStart: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateEnd: Date | null;
|
dateEnd: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
detail: string | null;
|
detail: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
reference: string | null;
|
reference: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandDate: Date | null;
|
refCommandDate: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandNo: string | null;
|
refCommandNo: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileDuty = Partial<CreateProfileDuty>;
|
export type UpdateProfileDuty = {
|
||||||
|
profileId: string | null;
|
||||||
|
isActive: boolean;
|
||||||
|
dateStart?: Date | null;
|
||||||
|
dateEnd?: Date | null;
|
||||||
|
detail: string | null;
|
||||||
|
reference: string | null;
|
||||||
|
refCommandDate?: Date | null;
|
||||||
|
refCommandNo: string | null;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { ProfileDuty } from "./ProfileDuty";
|
||||||
|
|
||||||
@Entity("profileDutyHistory")
|
@Entity("profileDutyHistory")
|
||||||
export class ProfileDutyHistory extends EntityBase {
|
export class ProfileDutyHistory extends EntityBase {
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะการใช้งาน",
|
comment: "สถานะการใช้งาน",
|
||||||
default: false,
|
default: false,
|
||||||
|
|
@ -68,37 +67,7 @@ export class ProfileDutyHistory extends EntityBase {
|
||||||
})
|
})
|
||||||
profileDutyId: string;
|
profileDutyId: string;
|
||||||
|
|
||||||
|
|
||||||
@ManyToOne(() => ProfileDuty, (profileDuty) => profileDuty.profileDutyHistories)
|
@ManyToOne(() => ProfileDuty, (profileDuty) => profileDuty.profileDutyHistories)
|
||||||
@JoinColumn({ name: "profileDutyId" })
|
@JoinColumn({ name: "profileDutyId" })
|
||||||
histories: ProfileDuty;
|
histories: ProfileDuty;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileDutyHistory {
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateStart: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateEnd: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
detail: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
reference: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandDate: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandNo: string | null;
|
|
||||||
|
|
||||||
@Column("uuid")
|
|
||||||
profileDutyId: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type UpdateProfileDutyHistory = Partial<CreateProfileDutyHistory>;
|
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ export class ProfileEducation extends EntityBase {
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ระดับศึกษา",
|
comment: "ระดับศึกษา",
|
||||||
type: "text", // ใช้ "text" แทน "string" เพื่อรองรับ long text
|
type: "text", // ใช้ "text" แทน "string" เพื่อรองรับ long text
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
educationLevel: string;
|
educationLevel: string;
|
||||||
|
|
@ -164,14 +164,16 @@ export class ProfileEducation extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
isEducation: boolean;
|
isEducation: boolean;
|
||||||
|
|
||||||
@OneToMany(() => ProfileEducationHistory, (profileEducationHistory) => profileEducationHistory.histories)
|
@OneToMany(
|
||||||
|
() => ProfileEducationHistory,
|
||||||
|
(profileEducationHistory) => profileEducationHistory.histories,
|
||||||
|
)
|
||||||
profileEducationHistories: ProfileEducationHistory[];
|
profileEducationHistories: ProfileEducationHistory[];
|
||||||
|
|
||||||
@ManyToOne(() => Profile, (profile) => profile.profileEducations)
|
@ManyToOne(() => Profile, (profile) => profile.profileEducations)
|
||||||
@JoinColumn({ name: "profileId" })
|
@JoinColumn({ name: "profileId" })
|
||||||
profile: Profile;
|
profile: Profile;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileEducation {
|
export class CreateProfileEducation {
|
||||||
|
|
@ -234,6 +236,9 @@ export class CreateProfileEducation {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isEducation: boolean | null;
|
isEducation: boolean | null;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
note: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileEducation = Partial<CreateProfileEducation>;
|
export type UpdateProfileEducation = Partial<CreateProfileEducation>;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { ProfileEducation } from "./ProfileEducation";
|
||||||
|
|
||||||
@Entity("profileEducationHistory")
|
@Entity("profileEducationHistory")
|
||||||
export class ProfileEducationHistory extends EntityBase {
|
export class ProfileEducationHistory extends EntityBase {
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะการใช้งาน",
|
comment: "สถานะการใช้งาน",
|
||||||
default: false,
|
default: false,
|
||||||
|
|
@ -108,7 +107,7 @@ export class ProfileEducationHistory extends EntityBase {
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ระดับศึกษา",
|
comment: "ระดับศึกษา",
|
||||||
type: "text", // ใช้ "text" แทน "string" เพื่อรองรับ long text
|
type: "text", // ใช้ "text" แทน "string" เพื่อรองรับ long text
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
educationLevel: string;
|
educationLevel: string;
|
||||||
|
|
@ -151,6 +150,13 @@ export class ProfileEducationHistory extends EntityBase {
|
||||||
})
|
})
|
||||||
isEducation: boolean;
|
isEducation: boolean;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "หมายเหตุ",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
note: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
|
|
@ -158,15 +164,16 @@ export class ProfileEducationHistory extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
profileEducationId: string;
|
profileEducationId: string;
|
||||||
|
|
||||||
@ManyToOne(() => ProfileEducation, (profileEducation) => profileEducation.profileEducationHistories)
|
@ManyToOne(
|
||||||
|
() => ProfileEducation,
|
||||||
|
(profileEducation) => profileEducation.profileEducationHistories,
|
||||||
|
)
|
||||||
@JoinColumn({ name: "profileEducationId" })
|
@JoinColumn({ name: "profileEducationId" })
|
||||||
histories: ProfileEducation;
|
histories: ProfileEducation;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileEducationHistory {
|
export class CreateProfileEducationHistory {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
|
|
@ -227,6 +234,8 @@ export class CreateProfileEducationHistory {
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
profileEducationId: string | null;
|
profileEducationId: string | null;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
note: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileEducationHistory = Partial<CreateProfileEducationHistory>;
|
export type UpdateProfileEducationHistory = Partial<CreateProfileEducationHistory>;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { ProfileHonor } from "./ProfileHonor";
|
||||||
|
|
||||||
@Entity("profileHonorHistory")
|
@Entity("profileHonorHistory")
|
||||||
export class ProfileHonorHistory extends EntityBase {
|
export class ProfileHonorHistory extends EntityBase {
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะการใช้งาน",
|
comment: "สถานะการใช้งาน",
|
||||||
default: false,
|
default: false,
|
||||||
|
|
@ -60,13 +59,19 @@ export class ProfileHonorHistory extends EntityBase {
|
||||||
})
|
})
|
||||||
profileHonorId: string;
|
profileHonorId: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ประเภทช่วงเวลาการศึกษา",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
isDate: boolean;
|
||||||
|
|
||||||
@ManyToOne(() => ProfileHonor, (profileHonor) => profileHonor.profileHonorHistories)
|
@ManyToOne(() => ProfileHonor, (profileHonor) => profileHonor.profileHonorHistories)
|
||||||
@JoinColumn({ name: "profileHonorId" })
|
@JoinColumn({ name: "profileHonorId" })
|
||||||
histories: ProfileHonor;
|
histories: ProfileHonor;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileHonorHistory {
|
export class CreateProfileHonorHistory {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
|
|
@ -80,11 +85,14 @@ export class CreateProfileHonorHistory {
|
||||||
issuer: string | null;
|
issuer: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
refCommandDate: Date | null;
|
refCommandDate: Date | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
refCommandNo: string | null;
|
refCommandNo: string | null;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
isDate: boolean | null;
|
||||||
|
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
profileHonorId: string | null;
|
profileHonorId: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export class ProfileInsignia extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
section: string;
|
section: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 30,
|
length: 30,
|
||||||
|
|
@ -63,7 +63,7 @@ export class ProfileInsignia extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
receiveDate: Date;
|
receiveDate: Date;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
|
|
@ -71,7 +71,7 @@ export class ProfileInsignia extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
insigniaId: string;
|
insigniaId: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ประเภท",
|
comment: "ประเภท",
|
||||||
|
|
@ -127,7 +127,10 @@ export class ProfileInsignia extends EntityBase {
|
||||||
})
|
})
|
||||||
note: string;
|
note: string;
|
||||||
|
|
||||||
@OneToMany(() => ProfileInsigniaHistory, (profileInsigniaHistory) => profileInsigniaHistory.histories)
|
@OneToMany(
|
||||||
|
() => ProfileInsigniaHistory,
|
||||||
|
(profileInsigniaHistory) => profileInsigniaHistory.histories,
|
||||||
|
)
|
||||||
profileInsigniaHistories: ProfileInsigniaHistory[];
|
profileInsigniaHistories: ProfileInsigniaHistory[];
|
||||||
|
|
||||||
@ManyToOne(() => Profile, (profile) => profile.profileInsignias)
|
@ManyToOne(() => Profile, (profile) => profile.profileInsignias)
|
||||||
|
|
@ -141,7 +144,7 @@ export class CreateProfileInsignia {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
year: number;
|
year: number;
|
||||||
|
|
||||||
|
|
@ -153,16 +156,16 @@ export class CreateProfileInsignia {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
section: string | null;
|
section: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
page: string | null;
|
page: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
receiveDate: Date | null;
|
receiveDate: Date | null;
|
||||||
|
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
insigniaId: string | null;
|
insigniaId: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
insigniaType: string | null;
|
insigniaType: string | null;
|
||||||
|
|
||||||
|
|
@ -180,6 +183,9 @@ export class CreateProfileInsignia {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
refCommandNo: string | null;
|
refCommandNo: string | null;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
note: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileInsignia = Partial<CreateProfileInsignia>;
|
export type UpdateProfileInsignia = Partial<CreateProfileInsignia>;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { ProfileInsignia } from "./ProfileInsignia";
|
||||||
|
|
||||||
@Entity("profileInsigniaHistory")
|
@Entity("profileInsigniaHistory")
|
||||||
export class ProfileInsigniaHistory extends EntityBase {
|
export class ProfileInsigniaHistory extends EntityBase {
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะการใช้งาน",
|
comment: "สถานะการใช้งาน",
|
||||||
default: false,
|
default: false,
|
||||||
|
|
@ -40,7 +39,7 @@ export class ProfileInsigniaHistory extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
section: string;
|
section: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 30,
|
length: 30,
|
||||||
|
|
@ -56,7 +55,7 @@ export class ProfileInsigniaHistory extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
receiveDate: Date;
|
receiveDate: Date;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
|
|
@ -64,7 +63,7 @@ export class ProfileInsigniaHistory extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
insigniaId: string;
|
insigniaId: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ประเภท",
|
comment: "ประเภท",
|
||||||
|
|
@ -113,6 +112,13 @@ export class ProfileInsigniaHistory extends EntityBase {
|
||||||
})
|
})
|
||||||
refCommandNo: string;
|
refCommandNo: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "หมายเหตุ",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
note: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
|
|
@ -127,10 +133,9 @@ export class ProfileInsigniaHistory extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileInsigniaHistory {
|
export class CreateProfileInsigniaHistory {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
year: number;
|
year: number;
|
||||||
|
|
||||||
|
|
@ -142,16 +147,16 @@ export class CreateProfileInsigniaHistory {
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
section: string | null;
|
section: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
page: string | null;
|
page: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
receiveDate: Date | null;
|
receiveDate: Date | null;
|
||||||
|
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
insigniaId: string | null;
|
insigniaId: string | null;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
insigniaType: string | null;
|
insigniaType: string | null;
|
||||||
|
|
||||||
|
|
@ -170,6 +175,9 @@ export class CreateProfileInsigniaHistory {
|
||||||
@Column()
|
@Column()
|
||||||
refCommandNo: string | null;
|
refCommandNo: string | null;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
note: string | null;
|
||||||
|
|
||||||
@Column("uuid")
|
@Column("uuid")
|
||||||
profileInsigniaId: string | null;
|
profileInsigniaId: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,7 @@ export class ProfileLeave extends EntityBase {
|
||||||
})
|
})
|
||||||
typeLeaveId: string;
|
typeLeaveId: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "เหตุผล",
|
comment: "เหตุผล",
|
||||||
type: "text",
|
type: "text",
|
||||||
|
|
@ -276,104 +276,73 @@ export class ProfileLeave extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileLeave {
|
export class CreateProfileLeave {
|
||||||
@Column("uuid")
|
|
||||||
profileId: string | null;
|
profileId: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column()
|
|
||||||
restCount: number | null;
|
restCount: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
restDay: number | null;
|
restDay: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
sickCount: number | null;
|
sickCount: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
sickDay: number | null;
|
sickDay: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
otherDay: number | null;
|
otherDay: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
personalCount: number | null;
|
personalCount: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
personalDay: number | null;
|
personalDay: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
studyCount: number | null;
|
studyCount: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
absentCount: number | null;
|
absentCount: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
absentDay: number | null;
|
absentDay: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
agencyCount: number | null;
|
agencyCount: number | null;
|
||||||
|
agencyDay: number | null;
|
||||||
@Column()
|
|
||||||
agencyDay: number | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
coupleCount: number | null;
|
coupleCount: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
coupleDay: number | null;
|
coupleDay: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
lateCount: number | null;
|
lateCount: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
lateDay: number | null;
|
lateDay: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
maternityCount: number | null;
|
maternityCount: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
maternityDay: number | null;
|
maternityDay: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
militaryCount: number | null;
|
militaryCount: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
militaryDay: number | null;
|
militaryDay: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
ordainCount: number | null;
|
ordainCount: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
ordainDay: number | null;
|
ordainDay: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
otherCount: number | null;
|
otherCount: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateStartLeave: Date | null;
|
dateStartLeave: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateEndLeave: Date | null;
|
dateEndLeave: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
numLeave: number | null;
|
numLeave: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
sumLeave: number | null;
|
sumLeave: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
totalLeave: number | null;
|
totalLeave: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
status: string | null;
|
status: string | null;
|
||||||
|
|
||||||
@Column("uuid")
|
|
||||||
typeLeaveId: string | null;
|
typeLeaveId: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
reason: string | null;
|
reason: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileLeave = Partial<CreateProfileLeave>;
|
export type UpdateProfileLeave = {
|
||||||
|
profileId: string | null;
|
||||||
|
isActive: boolean;
|
||||||
|
restCount: number | null;
|
||||||
|
restDay: number | null;
|
||||||
|
sickCount: number | null;
|
||||||
|
sickDay: number | null;
|
||||||
|
otherDay: number | null;
|
||||||
|
personalCount: number | null;
|
||||||
|
personalDay: number | null;
|
||||||
|
studyCount: number | null;
|
||||||
|
absentCount: number | null;
|
||||||
|
absentDay: number | null;
|
||||||
|
agencyCount: number | null;
|
||||||
|
agencyDay: number | null;
|
||||||
|
coupleCount: number | null;
|
||||||
|
coupleDay: number | null;
|
||||||
|
lateCount: number | null;
|
||||||
|
lateDay: number | null;
|
||||||
|
maternityCount: number | null;
|
||||||
|
maternityDay: number | null;
|
||||||
|
militaryCount: number | null;
|
||||||
|
militaryDay: number | null;
|
||||||
|
ordainCount: number | null;
|
||||||
|
ordainDay: number | null;
|
||||||
|
otherCount: number | null;
|
||||||
|
dateStartLeave?: Date | null;
|
||||||
|
dateEndLeave?: Date | null;
|
||||||
|
numLeave: number | null;
|
||||||
|
sumLeave: number | null;
|
||||||
|
totalLeave: number | null;
|
||||||
|
status: string | null;
|
||||||
|
typeLeaveId: string | null;
|
||||||
|
reason: string | null;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -68,27 +68,21 @@ export class ProfileNopaid extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileNopaid {
|
export class CreateProfileNopaid {
|
||||||
@Column("uuid")
|
|
||||||
profileId: string | null;
|
profileId: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column()
|
|
||||||
date: Date | null;
|
date: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
detail: string | null;
|
detail: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
reference: string | null;
|
reference: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandDate: Date | null;
|
refCommandDate: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandNo: string | null;
|
refCommandNo: string | null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileNopaid = Partial<CreateProfileNopaid>;
|
export type UpdateProfileNopaid = {
|
||||||
|
profileId: string | null;
|
||||||
|
isActive: boolean;
|
||||||
|
date?: Date | null;
|
||||||
|
detail: string | null;
|
||||||
|
reference: string | null;
|
||||||
|
refCommandDate?: Date | null;
|
||||||
|
refCommandNo: string | null;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { ProfileNopaid } from "./ProfileNopaid";
|
||||||
|
|
||||||
@Entity("profileNopaidHistory")
|
@Entity("profileNopaidHistory")
|
||||||
export class ProfileNopaidHistory extends EntityBase {
|
export class ProfileNopaidHistory extends EntityBase {
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะการใช้งาน",
|
comment: "สถานะการใช้งาน",
|
||||||
default: false,
|
default: false,
|
||||||
|
|
@ -60,35 +59,7 @@ export class ProfileNopaidHistory extends EntityBase {
|
||||||
})
|
})
|
||||||
profileNopaidId: string;
|
profileNopaidId: string;
|
||||||
|
|
||||||
|
|
||||||
@ManyToOne(() => ProfileNopaid, (profileNopaid) => profileNopaid.profileNopaidHistories)
|
@ManyToOne(() => ProfileNopaid, (profileNopaid) => profileNopaid.profileNopaidHistories)
|
||||||
@JoinColumn({ name: "profileNopaidId" })
|
@JoinColumn({ name: "profileNopaidId" })
|
||||||
histories: ProfileNopaid;
|
histories: ProfileNopaid;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileNopaidHistory {
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
date: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
detail: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
reference: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandDate: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
refCommandNo: string | null;
|
|
||||||
|
|
||||||
@Column("uuid")
|
|
||||||
profileNopaidId: string | null;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export type UpdateProfileNopaidHistory = Partial<CreateProfileNopaidHistory>;
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export class ProfileOther extends EntityBase {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "รายละเอียด",
|
comment: "รายละเอียด",
|
||||||
|
|
@ -44,17 +44,15 @@ export class ProfileOther extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileOther {
|
export class CreateProfileOther {
|
||||||
@Column("uuid")
|
|
||||||
profileId: string | null;
|
profileId: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column()
|
|
||||||
detail: string | null;
|
detail: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
date: Date | null;
|
date: Date | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileOther = Partial<CreateProfileOther>;
|
export type UpdateProfileOther = {
|
||||||
|
profileId: string | null;
|
||||||
|
isActive: boolean;
|
||||||
|
detail: string | null;
|
||||||
|
date?: Date | null;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ export class ProfileOtherHistory extends EntityBase {
|
||||||
default: false,
|
default: false,
|
||||||
})
|
})
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "รายละเอียด",
|
comment: "รายละเอียด",
|
||||||
|
|
@ -38,19 +38,3 @@ export class ProfileOtherHistory extends EntityBase {
|
||||||
@JoinColumn({ name: "profileOtherId" })
|
@JoinColumn({ name: "profileOtherId" })
|
||||||
histories: ProfileOther;
|
histories: ProfileOther;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileOtherHistory {
|
|
||||||
@Column("uuid")
|
|
||||||
profileOtherId: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
detail: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
date: Date | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type UpdateProfileOtherHistory = Partial<CreateProfileOtherHistory>;
|
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,11 @@ export class ProfileTraining extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
isDate: boolean;
|
isDate: boolean;
|
||||||
|
|
||||||
@OneToMany(() => ProfileTrainingHistory, (profileTrainingHistory) => profileTrainingHistory.histories)
|
@OneToMany(
|
||||||
|
() => ProfileTrainingHistory,
|
||||||
|
(profileTrainingHistory) => profileTrainingHistory.histories,
|
||||||
|
)
|
||||||
profileTrainingHistories: ProfileTrainingHistory[];
|
profileTrainingHistories: ProfileTrainingHistory[];
|
||||||
|
|
||||||
@ManyToOne(() => Profile, (profile) => profile.profileTrainings)
|
@ManyToOne(() => Profile, (profile) => profile.profileTrainings)
|
||||||
|
|
@ -114,44 +117,33 @@ export class ProfileTraining extends EntityBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileTraining {
|
export class CreateProfileTraining {
|
||||||
@Column("uuid")
|
|
||||||
profileId: string | null;
|
profileId: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
|
|
||||||
@Column()
|
|
||||||
startDate: Date | null;
|
startDate: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
endDate: Date | null;
|
endDate: Date | null;
|
||||||
|
numberOrder: string | null;
|
||||||
@Column()
|
|
||||||
numberOrder: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
topic: string | null;
|
topic: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
place: string | null;
|
place: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateOrder: Date | null;
|
dateOrder: Date | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
department: string | null;
|
department: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
duration: string | null;
|
duration: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
name: string | null;
|
name: string | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
yearly: number | null;
|
yearly: number | null;
|
||||||
|
|
||||||
@Column()
|
|
||||||
isDate: boolean | null;
|
isDate: boolean | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UpdateProfileTraining = Partial<CreateProfileTraining>;
|
export type UpdateProfileTraining = {
|
||||||
|
profileId: string | null;
|
||||||
|
isActive: boolean;
|
||||||
|
startDate?: Date | null;
|
||||||
|
endDate?: Date | null;
|
||||||
|
numberOrder: string | null;
|
||||||
|
topic: string | null;
|
||||||
|
place: string | null;
|
||||||
|
dateOrder?: Date | null;
|
||||||
|
department: string | null;
|
||||||
|
duration: string | null;
|
||||||
|
name: string | null;
|
||||||
|
yearly: number | null;
|
||||||
|
isDate: boolean | null;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import { ProfileTraining } from "./ProfileTraining";
|
||||||
|
|
||||||
@Entity("profileTrainingHistory")
|
@Entity("profileTrainingHistory")
|
||||||
export class ProfileTrainingHistory extends EntityBase {
|
export class ProfileTrainingHistory extends EntityBase {
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
comment: "สถานะการใช้งาน",
|
comment: "สถานะการใช้งาน",
|
||||||
default: false,
|
default: false,
|
||||||
|
|
@ -98,49 +97,15 @@ export class ProfileTrainingHistory extends EntityBase {
|
||||||
default: null,
|
default: null,
|
||||||
})
|
})
|
||||||
profileTrainingId: string;
|
profileTrainingId: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ประเภทช่วงเวลาการศึกษา",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
isDate: boolean;
|
||||||
|
|
||||||
@ManyToOne(() => ProfileTraining, (profileTraining) => profileTraining.profileTrainingHistories)
|
@ManyToOne(() => ProfileTraining, (profileTraining) => profileTraining.profileTrainingHistories)
|
||||||
@JoinColumn({ name: "profileTrainingId" })
|
@JoinColumn({ name: "profileTrainingId" })
|
||||||
histories: ProfileTraining;
|
histories: ProfileTraining;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class CreateProfileTrainingHistory {
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
isActive: boolean;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
startDate: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
endDate: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
numberOrder: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
topic: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
place: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
dateOrder: Date | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
department: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
duration: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
name: string | null;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
yearly: number | null;
|
|
||||||
|
|
||||||
@Column("uuid")
|
|
||||||
profileTrainingId: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type UpdateProfileTrainingHistory = Partial<CreateProfileTrainingHistory>;
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableProfileHistoryAddNote1710749867773 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableProfileHistoryAddNote1710749867773'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEducationHistory\` ADD \`note\` varchar(255) NULL COMMENT 'หมายเหตุ'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileInsigniaHistory\` ADD \`note\` varchar(255) NULL COMMENT 'หมายเหตุ'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileInsigniaHistory\` DROP COLUMN \`note\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileEducationHistory\` DROP COLUMN \`note\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableProfileHistoryAddIsDate1710752446531 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableProfileHistoryAddIsDate1710752446531'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileHonorHistory\` ADD \`isDate\` tinyint NULL COMMENT 'ประเภทช่วงเวลาการศึกษา'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileTrainingHistory\` ADD \`isDate\` tinyint NULL COMMENT 'ประเภทช่วงเวลาการศึกษา'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileTrainingHistory\` DROP COLUMN \`isDate\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`profileHonorHistory\` DROP COLUMN \`isDate\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue