update entity OrgGroup

This commit is contained in:
AdisakKanthawilang 2024-01-26 10:13:07 +07:00
parent bea20bb46b
commit 2dc74fc7d2
7 changed files with 22 additions and 41 deletions

View file

@ -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;
}
}
}

View file

@ -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")

View file

@ -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 {

View file

@ -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")

View file

@ -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 {

View file

@ -37,6 +37,8 @@ export class OrgRevision extends EntityBase {
default: false
})
orgRevisionIsDraft: boolean;
}
export type UpdateOrgRevision = Partial<OrgRevision>;

View file

@ -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")