Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2024-10-18 12:10:54 +07:00
commit e5b1c3b8d5
113 changed files with 455 additions and 505 deletions

View file

@ -8,7 +8,6 @@ import {
ManyToOne,
JoinColumn,
} from "typeorm";
import { CommandType } from "./CommandType";
import { PosMasterAssign } from "./PosMasterAssign";
import { CommandSys } from "./CommandSys";

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne } from "typeorm";
import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { AuthRoleAttr } from "./AuthRoleAttr";
import { PosMaster } from "./PosMaster";

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { AuthSys } from "./AuthSys";
import { AuthRole } from "./AuthRole";

View file

@ -1,7 +1,5 @@
import { Entity, Column, OneToMany } from "typeorm";
import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
@Entity("bloodGroup")
export class BloodGroup extends EntityBase {

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileChangePosition } from "./ProfileChangePosition";

View file

@ -4,6 +4,7 @@ import { CommandType } from "./CommandType";
import { CommandSend } from "./CommandSend";
import { CommandSalary } from "./CommandSalary";
import { CommandRecive } from "./CommandRecive";
import { ProfileSalary } from "./ProfileSalary";
@Entity("command")
export class Command extends EntityBase {
@ -151,6 +152,9 @@ export class Command extends EntityBase {
@OneToMany(() => CommandRecive, (commandRecive) => commandRecive.command)
commandRecives: CommandRecive[];
@OneToMany(() => ProfileSalary, (profileSalary) => profileSalary.command)
profileSalarys: ProfileSalary[];
}
export class CreateCommand {

View file

@ -1,4 +1,4 @@
import { Entity, Column, JoinColumn, ManyToOne, OneToMany, Double } from "typeorm";
import { Entity, Column, JoinColumn, ManyToOne, Double } from "typeorm";
import { EntityBase } from "./base/Base";
import { Command } from "./Command";

View file

@ -9,7 +9,6 @@ import {
import { CommandType } from "./CommandType";
import { CommandSalary } from "./CommandSalary";
import { Assign } from "./Assign";
import { Workflow } from "./Workflow";
@Entity("commandSys")
export class CommandSys {

View file

@ -1,7 +1,5 @@
import { Entity, Column, OneToMany } from "typeorm";
import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
@Entity("gender")
export class Gender extends EntityBase {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm";
import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_EDUCATION")
export class HR_EDUCATION {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm";
import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_EDUCATION_EMP")
export class HR_EDUCATION_EMP {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm";
import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_PERSONAL_EMP_ADDRESS")
export class HR_PERSONAL_EMP_ADDRESS {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm";
import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_PERSONAL_EMP_FAMILY")
export class HR_PERSONAL_EMP_FAMILY {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm";
import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_PERSONAL_OFFICER_ADDRESS")
export class HR_PERSONAL_OFFICER_ADDRESS {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm";
import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_PERSONAL_OFFICER_FAMILY")
export class HR_PERSONAL_OFFICER_FAMILY {

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, OneToOne, PrimaryGeneratedColumn } from "typeorm";
import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
@Entity("HR_POSITION_OFFICER")
export class HR_POSITION_OFFICER {

View file

@ -1,6 +1,5 @@
import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileLeave } from "./ProfileLeave";
@Entity("leaveType")

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { MetaState } from "./MetaState";

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { OrgRoot } from "./OrgRoot";
import { OrgChild2 } from "./OrgChild2";

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { OrgRoot } from "./OrgRoot";
import { OrgChild1 } from "./OrgChild1";

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { OrgRoot } from "./OrgRoot";
import { OrgChild1 } from "./OrgChild1";

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { OrgRoot } from "./OrgRoot";
import { PosMaster } from "./PosMaster";

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany, ManyToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { OrgChild1 } from "./OrgChild1";
import { OrgRevision } from "./OrgRevision";
@ -6,7 +6,6 @@ import { OrgChild2 } from "./OrgChild2";
import { OrgChild3 } from "./OrgChild3";
import { OrgChild4 } from "./OrgChild4";
import { PosMaster } from "./PosMaster";
import { Profile } from "./Profile";
import { PermissionOrg } from "./PermissionOrg";
enum OrgRootRank {

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { PosExecutive } from "./PosExecutive";
import { PosType } from "./PosType";

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { Position } from "./Position";
import { PosDict } from "./PosDict";

View file

@ -1,11 +1,9 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { PosType } from "./PosType";
import { Position } from "./Position";
import { PosDict } from "./PosDict";
import { Profile } from "./Profile";
import { profile } from "console";
import { Workflow } from "./Workflow";
enum PosLevelAuthority {
HEAD = "HEAD",
@ -57,9 +55,6 @@ export class PosLevel extends EntityBase {
@OneToMany(() => Profile, (profile) => profile.posLevel)
profiles: Profile[];
// @OneToMany(() => Workflow, (workflow) => workflow.posLevel)
// workflows: Workflow[];
}
export class CreatePosLevel {

View file

@ -195,6 +195,13 @@ export class PosMaster extends EntityBase {
})
authRoleId: string;
@Column({
comment: "สถานะออกคำสั่ง",
default: "PENDING",
length: 20,
})
statusReport: string;
@ManyToOne(() => AuthRole, (authRole) => authRole.posMasters)
@JoinColumn({ name: "authRoleId" })
authRole: AuthRole;

View file

@ -1,10 +1,9 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
import { Entity, Column, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { PosLevel } from "./PosLevel";
import { Position } from "./Position";
import { PosDict } from "./PosDict";
import { Profile } from "./Profile";
import { Workflow } from "./Workflow";
@Entity("posType")
export class PosType extends EntityBase {
@ -35,9 +34,6 @@ export class PosType extends EntityBase {
@OneToMany(() => Profile, (profile) => profile.posType)
profiles: Profile[];
// @OneToMany(() => Workflow, (workflow) => workflow.posType)
// workflows: Workflow[];
}
export class CreatePosType {

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { PosMaster } from "./PosMaster";
import { PosLevel } from "./PosLevel";

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, JoinColumn, ManyToOne, ManyToMany } from "typeorm";
import { Entity, Column, OneToMany, JoinColumn, ManyToOne } from "typeorm";
import { EntityBase } from "./base/Base";
import { PosMaster } from "./PosMaster";
import { PosLevel } from "./PosLevel";

View file

@ -1,6 +1,5 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileAbility } from "./ProfileAbility";
@Entity("profileAbilityHistory")

View file

@ -1,6 +1,5 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileAssessment } from "./ProfileAssessment";
@Entity("profileAssessmentHistory")

View file

@ -1,6 +1,5 @@
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileCertificate } from "./ProfileCertificate";
@Entity("profileCertificateHistory")

View file

@ -1,6 +1,5 @@
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileChangeNameHistory } from "./ProfileChangeNameHistory";
import { ProfileEmployee } from "./ProfileEmployee";
// import { ProfileChangeNameHistory } from "./ProfileChangeNameHistory";

View file

@ -1,6 +1,5 @@
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileChangeName } from "./ProfileChangeName";
@Entity("profileChangeNameHistory")

View file

@ -1,7 +1,5 @@
import { Column, Entity, ManyToOne, OneToMany, JoinColumn } from "typeorm";
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
import { ProfileChildren } from "./ProfileChildren";
@Entity("profileChildrenHistory")

View file

@ -1,6 +1,5 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileDiscipline } from "./ProfileDiscipline";
@Entity("profileDisciplineHistory")

View file

@ -1,6 +1,5 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileDuty } from "./ProfileDuty";
@Entity("profileDutyHistory")

View file

@ -1,4 +1,4 @@
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";

View file

@ -1,6 +1,5 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEducation } from "./ProfileEducation";
@Entity("profileEducationHistory")

View file

@ -24,7 +24,7 @@ import { ProfileFamilyFather } from "./ProfileFamilyFather";
import { ProfileFamilyMother } from "./ProfileFamilyMother";
import { ProfileFamilyCouple } from "./ProfileFamilyCouple";
import { ProfileChildren } from "./ProfileChildren";
import { Profile, ProfileAddressHistory } from "./Profile";
import { ProfileAddressHistory } from "./Profile";
import { Province } from "./Province";
import { District } from "./District";
import { SubDistrict } from "./SubDistrict";

View file

@ -1,4 +1,4 @@
import { Column, Entity, ManyToOne, OneToMany, JoinColumn } from "typeorm";
import { Column, Entity, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileFamilyCouple } from "./ProfileFamilyCouple";

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileFamilyFather } from "./ProfileFamilyFather";

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileFamilyMother } from "./ProfileFamilyMother";

View file

@ -1,6 +1,5 @@
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileHonor } from "./ProfileHonor";
@Entity("profileHonorHistory")

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { ProfileInsignia } from "./ProfileInsignia";
import { Insignia } from "./Insignia";

View file

@ -1,6 +1,5 @@
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileNopaid } from "./ProfileNopaid";
@Entity("profileNopaidHistory")

View file

@ -3,6 +3,7 @@ import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
import { ProfileSalaryHistory } from "./ProfileSalaryHistory";
import { Command } from "./Command";
@Entity("profileSalary")
export class ProfileSalary extends EntityBase {
@ -141,6 +142,32 @@ export class ProfileSalary extends EntityBase {
})
order: number;
@Column({
comment: "วันที่",
type: "datetime",
nullable: true,
})
dateGovernment: Date;
@Column({
nullable: true,
comment: "เข้ารับราชการ",
default: null,
})
isGovernment: boolean;
@Column({
nullable: true,
length: 40,
comment: "คีย์นอก(FK)ของตาราง command",
default: null,
})
commandId: string;
@ManyToOne(() => Command, (command) => command.profileSalarys)
@JoinColumn({ name: "commandId" })
command: Command;
@OneToMany(() => ProfileSalaryHistory, (profileSalaryHistory) => profileSalaryHistory.histories)
profileSalaryHistories: ProfileSalaryHistory[];

View file

@ -1,6 +1,5 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileTraining } from "./ProfileTraining";
@Entity("profileTrainingHistory")

View file

@ -1,9 +1,6 @@
import { Entity, Column, OneToMany } from "typeorm";
import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
@Entity("relationship")
export class Relationship extends EntityBase {
@Column({

View file

@ -1,7 +1,5 @@
import { Entity, Column, OneToMany } from "typeorm";
import { Entity, Column } from "typeorm";
import { EntityBase } from "./base/Base";
import { Profile } from "./Profile";
import { ProfileEmployee } from "./ProfileEmployee";
@Entity("religion")
export class Religion extends EntityBase {

View file

@ -1,7 +1,6 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
import { EntityBase } from "./base/Base";
import { State } from "./State";
import { StateOperatorUser } from "./StateOperatorUser";
@Entity("stateOperator")
export class StateOperator extends EntityBase {