er ฝั่ง user
This commit is contained in:
parent
27da57f35e
commit
fae8d38013
16 changed files with 870 additions and 72 deletions
|
|
@ -1,7 +1,12 @@
|
|||
import { Entity, Column, OneToMany, ManyToOne, ManyToMany, JoinTable } from "typeorm";
|
||||
import { Entity, Column, OneToMany, ManyToMany, JoinTable } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiCapacityDetail } from "./kpiCapacityDetail";
|
||||
import { KpiLink } from "./kpiLink";
|
||||
import { KpiUserInspector } from "./kpiUserInspector";
|
||||
import { KpiUserDirector } from "./kpiUserDirector";
|
||||
import { KpiUserExecutive } from "./kpiUserExecutive";
|
||||
import { KpiUserGroup } from "./kpiUserGroup";
|
||||
import { KpiUserHead } from "./kpiUserHead";
|
||||
|
||||
enum CapacityType {
|
||||
HEAD = "HEAD",
|
||||
|
|
@ -40,11 +45,35 @@ export class KpiCapacity extends EntityBase {
|
|||
description: string;
|
||||
|
||||
@OneToMany(() => KpiCapacityDetail, (kpiCapacityDetail) => kpiCapacityDetail.kpiCapacitys)
|
||||
KpiCapacityDetails: KpiCapacityDetail[];
|
||||
kpiCapacityDetails: KpiCapacityDetail[];
|
||||
|
||||
@ManyToMany(() => KpiLink, (kpiLink) => kpiLink.kpiCapacitys)
|
||||
@JoinTable()
|
||||
kpiLinks: KpiLink[];
|
||||
|
||||
// @OneToMany(() => KpiUserPlanned, (kpiUserPlanned) => kpiUserPlanned.kpiCapacitys)
|
||||
// kpiUserPlanneds: KpiUserPlanned[];
|
||||
|
||||
// @OneToMany(() => KpiUserPosition, (kpiUserPosition) => kpiUserPosition.kpiCapacitys)
|
||||
// kpiUserPositions: KpiUserPosition[];
|
||||
|
||||
// @OneToMany(() => KpiUserSpecial, (kpiUserSpecial) => kpiUserSpecial.kpiCapacitys)
|
||||
// kpiUserSpecials: KpiUserSpecial[];
|
||||
|
||||
@OneToMany(() => KpiUserHead, (kpiUserHead) => kpiUserHead.kpiCapacitys)
|
||||
kpiUserHeads: KpiUserHead[];
|
||||
|
||||
@OneToMany(() => KpiUserGroup, (kpiUserGroup) => kpiUserGroup.kpiCapacitys)
|
||||
kpiUserGroups: KpiUserGroup[];
|
||||
|
||||
@OneToMany(() => KpiUserExecutive, (kpiUserExecutive) => kpiUserExecutive.kpiCapacitys)
|
||||
kpiUserExecutives: KpiUserExecutive[];
|
||||
|
||||
@OneToMany(() => KpiUserDirector, (kpiUserDirector) => kpiUserDirector.kpiCapacitys)
|
||||
kpiUserDirectors: KpiUserDirector[];
|
||||
|
||||
@OneToMany(() => KpiUserInspector, (kpiUserInspector) => kpiUserInspector.kpiCapacitys)
|
||||
kpiUserInspectors: KpiUserInspector[];
|
||||
}
|
||||
export class createKpiCapacity {
|
||||
@Column()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiCapacity } from "./kpiCapacity";
|
||||
import { KpiUserHead } from "./kpiUserHead";
|
||||
|
||||
@Entity("kpiCapacityDetail")
|
||||
export class KpiCapacityDetail extends EntityBase {
|
||||
|
|
@ -27,7 +28,7 @@ export class KpiCapacityDetail extends EntityBase {
|
|||
})
|
||||
kpiCapacityId: string;
|
||||
|
||||
@ManyToOne(() => KpiCapacity, (kpiCapacity) => kpiCapacity.KpiCapacityDetails)
|
||||
@ManyToOne(() => KpiCapacity, (kpiCapacity) => kpiCapacity.kpiCapacityDetails)
|
||||
@JoinColumn({ name: "kpiCapacityId" })
|
||||
kpiCapacitys: KpiCapacity;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { EntityBase } from "./base/Base";
|
|||
import { KpiPlan } from "./kpiPlan";
|
||||
import { KpiRole } from "./kpiRole";
|
||||
import { KpiUserEvaluation } from "./kpiUserEvaluation";
|
||||
import { KpiSpecial } from "./kpiSpecial";
|
||||
|
||||
@Entity("kpiPeriod")
|
||||
export class KpiPeriod extends EntityBase {
|
||||
|
|
@ -46,7 +47,10 @@ export class KpiPeriod extends EntityBase {
|
|||
|
||||
@OneToMany(() => KpiPlan, (kpiPlan) => kpiPlan.kpiPeriod)
|
||||
kpiPlans: KpiPlan[];
|
||||
|
||||
|
||||
@OneToMany(() => KpiSpecial, (kpiSpecial) => kpiSpecial.kpiPeriod)
|
||||
kpiSpecials: KpiSpecial[];
|
||||
|
||||
@OneToMany(() => KpiUserEvaluation, (kpiPlan) => kpiPlan.kpiPeriod)
|
||||
kpiUserEvaluation: KpiUserEvaluation[];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
|||
import { EntityBase } from "./base/Base";
|
||||
import { KpiLink } from "./kpiLink";
|
||||
import { KpiPeriod } from "./kpiPeriod";
|
||||
import { KpiUserPlanned } from "./kpiUserPlanned";
|
||||
|
||||
@Entity("kpiPlan")
|
||||
export class KpiPlan extends EntityBase {
|
||||
|
|
@ -287,6 +288,9 @@ export class KpiPlan extends EntityBase {
|
|||
@ManyToOne(() => KpiPeriod, (kpiPeriod) => kpiPeriod.kpiPlans)
|
||||
@JoinColumn({ name: "kpiPeriodId" })
|
||||
kpiPeriod: KpiPeriod;
|
||||
|
||||
@OneToMany(() => KpiUserPlanned, (kpiUserPlanned) => kpiUserPlanned.kpiPlans)
|
||||
kpiUserPlanneds: KpiUserPlanned[];
|
||||
}
|
||||
export class createKpiPlan {
|
||||
@Column()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiLink } from "./kpiLink";
|
||||
import { KpiPeriod } from "./kpiPeriod";
|
||||
import { KpiUserRole } from "./kpiUserRole";
|
||||
|
||||
@Entity("kpiRole")
|
||||
export class KpiRole extends EntityBase {
|
||||
|
|
@ -219,6 +219,9 @@ export class KpiRole extends EntityBase {
|
|||
@ManyToOne(() => KpiPeriod, (kpiPeriod) => kpiPeriod.kpiRoles)
|
||||
@JoinColumn({ name: "kpiPeriodId" })
|
||||
kpiPeriod: KpiPeriod;
|
||||
|
||||
@OneToMany(() => KpiUserRole, (kpiUserRole) => kpiUserRole.kpiRoles)
|
||||
kpiUserRoles: KpiUserRole[];
|
||||
}
|
||||
export class createKpiRole {
|
||||
@Column()
|
||||
|
|
|
|||
371
src/entities/kpiSpecial.ts
Normal file
371
src/entities/kpiSpecial.ts
Normal file
|
|
@ -0,0 +1,371 @@
|
|||
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiLink } from "./kpiLink";
|
||||
import { KpiPeriod } from "./kpiPeriod";
|
||||
import { KpiUserSpecial } from "./kpiUserSpecial";
|
||||
|
||||
@Entity("kpiSpecial")
|
||||
export class KpiSpecial extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "รหัสตัวชี้วัด",
|
||||
default: null,
|
||||
})
|
||||
including: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อตัวชี้วัด",
|
||||
default: null,
|
||||
})
|
||||
includingName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ค่าเป้าหมาย",
|
||||
default: null,
|
||||
})
|
||||
target: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หน่วยนับ",
|
||||
default: null,
|
||||
})
|
||||
unit: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "น้ำหนัก",
|
||||
default: null,
|
||||
})
|
||||
weight: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ผลสำเร็จของงาน 1",
|
||||
default: null,
|
||||
})
|
||||
achievement1: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ผลสำเร็จของงาน 2",
|
||||
default: null,
|
||||
})
|
||||
achievement2: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ผลสำเร็จของงาน 3",
|
||||
default: null,
|
||||
})
|
||||
achievement3: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ผลสำเร็จของงาน 4",
|
||||
default: null,
|
||||
})
|
||||
achievement4: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ผลสำเร็จของงาน 5",
|
||||
default: null,
|
||||
})
|
||||
achievement5: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "นิยามหรือความหมาย",
|
||||
default: null,
|
||||
})
|
||||
meaning: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "สูตรคำนวณ",
|
||||
default: null,
|
||||
})
|
||||
formula: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน",
|
||||
default: null,
|
||||
})
|
||||
rootId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน",
|
||||
default: null,
|
||||
})
|
||||
root: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน",
|
||||
default: null,
|
||||
})
|
||||
rootShortName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child1",
|
||||
default: null,
|
||||
})
|
||||
child1Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child1",
|
||||
default: null,
|
||||
})
|
||||
child1: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child1",
|
||||
default: null,
|
||||
})
|
||||
child1ShortName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child2",
|
||||
default: null,
|
||||
})
|
||||
child2Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child2",
|
||||
default: null,
|
||||
})
|
||||
child2: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child2",
|
||||
default: null,
|
||||
})
|
||||
child2ShortName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child3",
|
||||
default: null,
|
||||
})
|
||||
child3Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child3",
|
||||
default: null,
|
||||
})
|
||||
child3: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child3",
|
||||
default: null,
|
||||
})
|
||||
child3ShortName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "id หน่วยงาน child4",
|
||||
default: null,
|
||||
})
|
||||
child4Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อหน่วยงาน child4",
|
||||
default: null,
|
||||
})
|
||||
child4: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อย่อหน่วยงาน child4",
|
||||
default: null,
|
||||
})
|
||||
child4ShortName: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "id revision",
|
||||
default: null,
|
||||
})
|
||||
orgRevisionId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild1",
|
||||
default: null,
|
||||
})
|
||||
strategyChild1Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อ strategyChild1",
|
||||
default: null,
|
||||
})
|
||||
strategyChild1: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild2",
|
||||
default: null,
|
||||
})
|
||||
strategyChild2Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อ strategyChild2",
|
||||
default: null,
|
||||
})
|
||||
strategyChild2: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild3",
|
||||
default: null,
|
||||
})
|
||||
strategyChild3Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อ strategyChild3",
|
||||
default: null,
|
||||
})
|
||||
strategyChild3: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild4",
|
||||
default: null,
|
||||
})
|
||||
strategyChild4Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อ strategyChild4",
|
||||
default: null,
|
||||
})
|
||||
strategyChild4: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง strategyChild5",
|
||||
default: null,
|
||||
})
|
||||
strategyChild5Id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ชื่อ strategyChild5",
|
||||
default: null,
|
||||
})
|
||||
strategyChild5: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "ไอดีรอบ",
|
||||
default: null,
|
||||
})
|
||||
kpiPeriodId: string | null;
|
||||
|
||||
@ManyToOne(() => KpiPeriod, (kpiPeriod) => kpiPeriod.kpiSpecials)
|
||||
@JoinColumn({ name: "kpiPeriodId" })
|
||||
kpiPeriod: KpiPeriod;
|
||||
|
||||
@OneToMany(() => KpiUserSpecial, (kpiUserSpecial) => kpiUserSpecial.kpiSpecials)
|
||||
kpiUserSpecials: KpiUserSpecial[];
|
||||
}
|
||||
export class createKpiSpecial {
|
||||
@Column()
|
||||
including: string | null;
|
||||
@Column()
|
||||
includingName: string | null;
|
||||
@Column()
|
||||
target: string | null;
|
||||
@Column()
|
||||
unit: number | null;
|
||||
@Column()
|
||||
weight: number | null;
|
||||
@Column()
|
||||
achievement1: string | null;
|
||||
@Column()
|
||||
achievement2: string | null;
|
||||
@Column()
|
||||
achievement3: string | null;
|
||||
@Column()
|
||||
achievement4: string | null;
|
||||
@Column()
|
||||
achievement5: string | null;
|
||||
@Column()
|
||||
meaning: string | null;
|
||||
@Column()
|
||||
formula: string | null;
|
||||
@Column()
|
||||
node: number;
|
||||
@Column()
|
||||
nodeId: string | null;
|
||||
@Column()
|
||||
orgRevisionId: string;
|
||||
@Column()
|
||||
strategy: number;
|
||||
@Column()
|
||||
strategyId: string | null;
|
||||
@Column()
|
||||
kpiPeriodId: string | null;
|
||||
}
|
||||
|
||||
export class updateKpiSpecial {
|
||||
@Column()
|
||||
including: string | null;
|
||||
@Column()
|
||||
includingName: string | null;
|
||||
@Column()
|
||||
target: string | null;
|
||||
@Column()
|
||||
unit: number | null;
|
||||
@Column()
|
||||
weight: number | null;
|
||||
@Column()
|
||||
achievement1: string | null;
|
||||
@Column()
|
||||
achievement2: string | null;
|
||||
@Column()
|
||||
achievement3: string | null;
|
||||
@Column()
|
||||
achievement4: string | null;
|
||||
@Column()
|
||||
achievement5: string | null;
|
||||
@Column()
|
||||
meaning: string | null;
|
||||
@Column()
|
||||
formula: string | null;
|
||||
@Column()
|
||||
node: number;
|
||||
@Column()
|
||||
nodeId: string | null;
|
||||
@Column()
|
||||
orgRevisionId: string;
|
||||
@Column()
|
||||
strategy: number;
|
||||
@Column()
|
||||
strategyId: string | null;
|
||||
@Column()
|
||||
kpiPeriodId: string | null;
|
||||
}
|
||||
31
src/entities/kpiUserDirector.ts
Normal file
31
src/entities/kpiUserDirector.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiCapacity } from "./kpiCapacity";
|
||||
import { KpiUserEvaluation } from "./kpiUserEvaluation";
|
||||
|
||||
@Entity("kpiUserDirector")
|
||||
export class KpiUserDirector extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation",
|
||||
default: null,
|
||||
})
|
||||
kpiUserEvaluationId: string;
|
||||
|
||||
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserDirectors)
|
||||
@JoinColumn({ name: "kpiUserEvaluationId" })
|
||||
kpiUserEvaluations: KpiUserEvaluation;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiCapacity",
|
||||
default: null,
|
||||
})
|
||||
kpiCapacityId: string;
|
||||
|
||||
@ManyToOne(() => KpiCapacity, (kpiCapacity) => kpiCapacity.kpiUserDirectors)
|
||||
@JoinColumn({ name: "kpiCapacityId" })
|
||||
kpiCapacitys: KpiCapacity;
|
||||
}
|
||||
|
|
@ -1,6 +1,14 @@
|
|||
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiPeriod } from "./kpiPeriod";
|
||||
import { KpiUserHead } from "./kpiUserHead";
|
||||
import { KpiUserGroup } from "./kpiUserGroup";
|
||||
import { KpiUserExecutive } from "./kpiUserExecutive";
|
||||
import { KpiUserDirector } from "./kpiUserDirector";
|
||||
import { KpiUserInspector } from "./kpiUserInspector";
|
||||
import { KpiUserSpecial } from "./kpiUserSpecial";
|
||||
import { KpiUserRole } from "./kpiUserRole";
|
||||
import { KpiUserPlanned } from "./kpiUserPlanned";
|
||||
@Entity("kpiUserEvaluation")
|
||||
export class KpiUserEvaluation extends EntityBase {
|
||||
@Column({
|
||||
|
|
@ -46,6 +54,30 @@ export class KpiUserEvaluation extends EntityBase {
|
|||
@ManyToOne(() => KpiPeriod, (kpiPeriod) => kpiPeriod.kpiUserEvaluation)
|
||||
@JoinColumn({ name: "kpiPeriodId" })
|
||||
kpiPeriod: KpiPeriod;
|
||||
|
||||
@OneToMany(() => KpiUserHead, (kpiUserHead) => kpiUserHead.kpiUserEvaluations)
|
||||
kpiUserHeads: KpiUserHead[];
|
||||
|
||||
@OneToMany(() => KpiUserGroup, (kpiUserGroup) => kpiUserGroup.kpiUserEvaluations)
|
||||
kpiUserGroups: KpiUserGroup[];
|
||||
|
||||
@OneToMany(() => KpiUserExecutive, (kpiUserExecutive) => kpiUserExecutive.kpiUserEvaluations)
|
||||
kpiUserExecutives: KpiUserExecutive[];
|
||||
|
||||
@OneToMany(() => KpiUserDirector, (kpiUserDirector) => kpiUserDirector.kpiUserEvaluations)
|
||||
kpiUserDirectors: KpiUserDirector[];
|
||||
|
||||
@OneToMany(() => KpiUserInspector, (kpiUserInspector) => kpiUserInspector.kpiUserEvaluations)
|
||||
kpiUserInspectors: KpiUserInspector[];
|
||||
|
||||
@OneToMany(() => KpiUserPlanned, (kpiUserPlanned) => kpiUserPlanned.kpiUserEvaluations)
|
||||
kpiUserPlanneds: KpiUserPlanned[];
|
||||
|
||||
@OneToMany(() => KpiUserRole, (kpiUserRole) => kpiUserRole.kpiUserEvaluations)
|
||||
kpiUserRoles: KpiUserRole[];
|
||||
|
||||
@OneToMany(() => KpiUserSpecial, (kpiUserSpecial) => kpiUserSpecial.kpiUserEvaluations)
|
||||
kpiUserSpecials: KpiUserSpecial[];
|
||||
}
|
||||
|
||||
export class createKpiUserEvaluation {
|
||||
|
|
|
|||
31
src/entities/kpiUserExecutive.ts
Normal file
31
src/entities/kpiUserExecutive.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiCapacity } from "./kpiCapacity";
|
||||
import { KpiUserEvaluation } from "./kpiUserEvaluation";
|
||||
|
||||
@Entity("kpiUserExecutive")
|
||||
export class KpiUserExecutive extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation",
|
||||
default: null,
|
||||
})
|
||||
kpiUserEvaluationId: string;
|
||||
|
||||
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserExecutives)
|
||||
@JoinColumn({ name: "kpiUserEvaluationId" })
|
||||
kpiUserEvaluations: KpiUserEvaluation;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiCapacity",
|
||||
default: null,
|
||||
})
|
||||
kpiCapacityId: string;
|
||||
|
||||
@ManyToOne(() => KpiCapacity, (kpiCapacity) => kpiCapacity.kpiUserExecutives)
|
||||
@JoinColumn({ name: "kpiCapacityId" })
|
||||
kpiCapacitys: KpiCapacity;
|
||||
}
|
||||
31
src/entities/kpiUserGroup.ts
Normal file
31
src/entities/kpiUserGroup.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiCapacity } from "./kpiCapacity";
|
||||
import { KpiUserEvaluation } from "./kpiUserEvaluation";
|
||||
|
||||
@Entity("kpiUserGroup")
|
||||
export class KpiUserGroup extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation",
|
||||
default: null,
|
||||
})
|
||||
kpiUserEvaluationId: string;
|
||||
|
||||
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserGroups)
|
||||
@JoinColumn({ name: "kpiUserEvaluationId" })
|
||||
kpiUserEvaluations: KpiUserEvaluation;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiCapacity",
|
||||
default: null,
|
||||
})
|
||||
kpiCapacityId: string;
|
||||
|
||||
@ManyToOne(() => KpiCapacity, (kpiCapacity) => kpiCapacity.kpiUserGroups)
|
||||
@JoinColumn({ name: "kpiCapacityId" })
|
||||
kpiCapacitys: KpiCapacity;
|
||||
}
|
||||
31
src/entities/kpiUserHead.ts
Normal file
31
src/entities/kpiUserHead.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiCapacity } from "./kpiCapacity";
|
||||
import { KpiUserEvaluation } from "./kpiUserEvaluation";
|
||||
|
||||
@Entity("kpiUserHead")
|
||||
export class KpiUserHead extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation",
|
||||
default: null,
|
||||
})
|
||||
kpiUserEvaluationId: string;
|
||||
|
||||
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserHeads)
|
||||
@JoinColumn({ name: "kpiUserEvaluationId" })
|
||||
kpiUserEvaluations: KpiUserEvaluation;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiCapacity",
|
||||
default: null,
|
||||
})
|
||||
kpiCapacityId: string;
|
||||
|
||||
@ManyToOne(() => KpiCapacity, (kpiCapacity) => kpiCapacity.kpiUserHeads)
|
||||
@JoinColumn({ name: "kpiCapacityId" })
|
||||
kpiCapacitys: KpiCapacity;
|
||||
}
|
||||
31
src/entities/kpiUserInspector.ts
Normal file
31
src/entities/kpiUserInspector.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { Entity, Column, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiCapacity } from "./kpiCapacity";
|
||||
import { KpiUserEvaluation } from "./kpiUserEvaluation";
|
||||
|
||||
@Entity("kpiUserInspector")
|
||||
export class KpiUserInspector extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation",
|
||||
default: null,
|
||||
})
|
||||
kpiUserEvaluationId: string;
|
||||
|
||||
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserInspectors)
|
||||
@JoinColumn({ name: "kpiUserEvaluationId" })
|
||||
kpiUserEvaluations: KpiUserEvaluation;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiCapacity",
|
||||
default: null,
|
||||
})
|
||||
kpiCapacityId: string;
|
||||
|
||||
@ManyToOne(() => KpiCapacity, (kpiCapacity) => kpiCapacity.kpiUserInspectors)
|
||||
@JoinColumn({ name: "kpiCapacityId" })
|
||||
kpiCapacitys: KpiCapacity;
|
||||
}
|
||||
66
src/entities/kpiUserPlanned.ts
Normal file
66
src/entities/kpiUserPlanned.ts
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiUserEvaluation } from "./kpiUserEvaluation";
|
||||
import { KpiPlan } from "./kpiPlan";
|
||||
|
||||
@Entity("kpiUserPlanned")
|
||||
export class KpiUserPlanned extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ค่าเป้าหมาย",
|
||||
default: null,
|
||||
})
|
||||
target: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หน่วยนับ",
|
||||
default: null,
|
||||
})
|
||||
unit: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "น้ำหนัก",
|
||||
default: null,
|
||||
})
|
||||
weight: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "นิยามหรือความหมาย",
|
||||
default: null,
|
||||
})
|
||||
meaning: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "สูตรคำนวณ",
|
||||
default: null,
|
||||
})
|
||||
formula: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation",
|
||||
default: null,
|
||||
})
|
||||
kpiUserEvaluationId: string;
|
||||
|
||||
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserPlanneds)
|
||||
@JoinColumn({ name: "kpiUserEvaluationId" })
|
||||
kpiUserEvaluations: KpiUserEvaluation;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiPlan",
|
||||
default: null,
|
||||
})
|
||||
kpiPlanId: string;
|
||||
|
||||
@ManyToOne(() => KpiPlan, (kpiPlan) => kpiPlan.kpiUserPlanneds)
|
||||
@JoinColumn({ name: "kpiPlanId" })
|
||||
kpiPlans: KpiPlan;
|
||||
}
|
||||
66
src/entities/kpiUserRole.ts
Normal file
66
src/entities/kpiUserRole.ts
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiUserEvaluation } from "./kpiUserEvaluation";
|
||||
import { KpiRole } from "./kpiRole";
|
||||
|
||||
@Entity("kpiUserRole")
|
||||
export class KpiUserRole extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ค่าเป้าหมาย",
|
||||
default: null,
|
||||
})
|
||||
target: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หน่วยนับ",
|
||||
default: null,
|
||||
})
|
||||
unit: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "น้ำหนัก",
|
||||
default: null,
|
||||
})
|
||||
weight: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "นิยามหรือความหมาย",
|
||||
default: null,
|
||||
})
|
||||
meaning: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "สูตรคำนวณ",
|
||||
default: null,
|
||||
})
|
||||
formula: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation",
|
||||
default: null,
|
||||
})
|
||||
kpiUserEvaluationId: string;
|
||||
|
||||
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserRoles)
|
||||
@JoinColumn({ name: "kpiUserEvaluationId" })
|
||||
kpiUserEvaluations: KpiUserEvaluation;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiRole",
|
||||
default: null,
|
||||
})
|
||||
kpiRoleId: string;
|
||||
|
||||
@ManyToOne(() => KpiRole, (kpiRole) => kpiRole.kpiUserRoles)
|
||||
@JoinColumn({ name: "kpiRoleId" })
|
||||
kpiRoles: KpiRole;
|
||||
}
|
||||
66
src/entities/kpiUserSpecial.ts
Normal file
66
src/entities/kpiUserSpecial.ts
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { KpiUserEvaluation } from "./kpiUserEvaluation";
|
||||
import { KpiSpecial } from "./kpiSpecial";
|
||||
|
||||
@Entity("kpiUserSpecial")
|
||||
export class KpiUserSpecial extends EntityBase {
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ค่าเป้าหมาย",
|
||||
default: null,
|
||||
})
|
||||
target: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หน่วยนับ",
|
||||
default: null,
|
||||
})
|
||||
unit: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "น้ำหนัก",
|
||||
default: null,
|
||||
})
|
||||
weight: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "นิยามหรือความหมาย",
|
||||
default: null,
|
||||
})
|
||||
meaning: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "สูตรคำนวณ",
|
||||
default: null,
|
||||
})
|
||||
formula: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiUserEvaluation",
|
||||
default: null,
|
||||
})
|
||||
kpiUserEvaluationId: string;
|
||||
|
||||
@ManyToOne(() => KpiUserEvaluation, (kpiUserEvaluation) => kpiUserEvaluation.kpiUserSpecials)
|
||||
@JoinColumn({ name: "kpiUserEvaluationId" })
|
||||
kpiUserEvaluations: KpiUserEvaluation;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง kpiSpecial",
|
||||
default: null,
|
||||
})
|
||||
kpiSpecialId: string;
|
||||
|
||||
@ManyToOne(() => KpiSpecial, (kpiSpecial) => kpiSpecial.kpiUserSpecials)
|
||||
@JoinColumn({ name: "kpiSpecialId" })
|
||||
kpiSpecials: KpiSpecial;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue