From 2dc74fc7d2b9d92ab17f29000feb0b7a61edf6ba Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Fri, 26 Jan 2024 10:13:07 +0700 Subject: [PATCH] update entity OrgGroup --- src/controllers/OrgRootController.ts | 21 --------------------- src/entities/OrgChild1.ts | 8 ++++---- src/entities/OrgChild2.ts | 8 ++++---- src/entities/OrgChild3.ts | 8 ++++---- src/entities/OrgChild4.ts | 8 ++++---- src/entities/OrgRevision.ts | 2 ++ src/entities/OrgRoot.ts | 8 ++++---- 7 files changed, 22 insertions(+), 41 deletions(-) diff --git a/src/controllers/OrgRootController.ts b/src/controllers/OrgRootController.ts index 02ae63fe..bf197199 100644 --- a/src/controllers/OrgRootController.ts +++ b/src/controllers/OrgRootController.ts @@ -179,25 +179,4 @@ export class OrgRootController extends Controller { } } - /** - * รายละเอียดโครงสร้างระดับ Root - * - * @summary ORG_016 - รายละเอียดโครงสร้างระดับ Root (ADMIN) #16 - * - * @param {string} id Guid, *Id root - */ - @Get("root/{id}") - async detail(@Path() id: string) { - try { - const orgRoot = await this.orgRootRepository.findOne({ where: { id } }); - - if (!orgRoot) { - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล"); - } - - return new HttpSuccess(orgRoot); - } catch (error) { - return error; - } - } } diff --git a/src/entities/OrgChild1.ts b/src/entities/OrgChild1.ts index fc79b25f..c3e2fc93 100644 --- a/src/entities/OrgChild1.ts +++ b/src/entities/OrgChild1.ts @@ -4,10 +4,10 @@ import { OrgRoot } from "./OrgRoot"; import { OrgChild2 } from "./OrgChild2"; enum OrgChild1Rank { - DEPARTMENT = "department", - OFFICE = "office", - DIVISION = "division", - SECTION = "section", + DEPARTMENT = "DEPARTMENT", + OFFICE = "OFFICE", + DIVISION = "DIVISION", + SECTION = "SECTION", } @Entity("orgChild1") diff --git a/src/entities/OrgChild2.ts b/src/entities/OrgChild2.ts index 88910e89..76dbed14 100644 --- a/src/entities/OrgChild2.ts +++ b/src/entities/OrgChild2.ts @@ -7,10 +7,10 @@ import { OrgChild4 } from "./OrgChild4"; // ENUM orgChild2Rank enum OrgChild2Rank { - DEPARTMENT = "department", - OFFICE = "office", - DIVISION = "division", - SECTION = "section", + DEPARTMENT = "DEPARTMENT", + OFFICE = "OFFICE", + DIVISION = "DIVISION", + SECTION = "SECTION", } @Entity("orgChild2") export class OrgChild2 extends EntityBase { diff --git a/src/entities/OrgChild3.ts b/src/entities/OrgChild3.ts index 11b9ec41..bb3ca582 100644 --- a/src/entities/OrgChild3.ts +++ b/src/entities/OrgChild3.ts @@ -4,10 +4,10 @@ import { OrgChild2 } from "./OrgChild2"; import { OrgChild4 } from "./OrgChild4"; enum OrgChild3Rank { - DEPARTMENT = "department", - OFFICE = "office", - DIVISION = "division", - SECTION = "section", + DEPARTMENT = "DEPARTMENT", + OFFICE = "OFFICE", + DIVISION = "DIVISION", + SECTION = "SECTION", } @Entity("orgChild3") diff --git a/src/entities/OrgChild4.ts b/src/entities/OrgChild4.ts index 9aa14fdf..d9b6b05f 100644 --- a/src/entities/OrgChild4.ts +++ b/src/entities/OrgChild4.ts @@ -6,10 +6,10 @@ import { OrgChild2 } from "./OrgChild2"; import { OrgChild3 } from "./OrgChild3"; // ENUM orgChild4Rank enum OrgChild4Rank { - DEPARTMENT = "department", - OFFICE = "office", - DIVISION = "division", - SECTION = "section", + DEPARTMENT = "DEPARTMENT", + OFFICE = "OFFICE", + DIVISION = "DIVISION", + SECTION = "SECTION", } @Entity("orgChild4") export class OrgChild4 extends EntityBase { diff --git a/src/entities/OrgRevision.ts b/src/entities/OrgRevision.ts index 2e98c29d..0d0d51cb 100644 --- a/src/entities/OrgRevision.ts +++ b/src/entities/OrgRevision.ts @@ -37,6 +37,8 @@ export class OrgRevision extends EntityBase { default: false }) orgRevisionIsDraft: boolean; + + } export type UpdateOrgRevision = Partial; diff --git a/src/entities/OrgRoot.ts b/src/entities/OrgRoot.ts index 638c193e..d950aa67 100644 --- a/src/entities/OrgRoot.ts +++ b/src/entities/OrgRoot.ts @@ -4,10 +4,10 @@ import { OrgChild1 } from "./OrgChild1"; // ENUM orgRootRank enum OrgRootRank { - DEPARTMENT = "department", - OFFICE = "office", - DIVISION = "division", - SECTION = "section", + DEPARTMENT = "DEPARTMENT", + OFFICE = "OFFICE", + DIVISION = "DIVISION", + SECTION = "SECTION", } @Entity("orgRoot")