เพิ่มแก้ไขโครงสร้าง

This commit is contained in:
kittapath 2024-09-06 09:41:47 +07:00
parent bee2b69f61
commit 98ebf587a3
16 changed files with 565 additions and 410 deletions

View file

@ -1,4 +1,4 @@
import { Entity, Column, ManyToOne, JoinColumn, OneToOne, OneToMany } from "typeorm";
import { Entity, Column, ManyToOne, JoinColumn, OneToMany, ManyToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { OrgChild1 } from "./OrgChild1";
import { OrgRevision } from "./OrgRevision";
@ -6,6 +6,8 @@ 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 {
DEPARTMENT = "DEPARTMENT",
@ -128,6 +130,9 @@ export class OrgRoot extends EntityBase {
@OneToMany(() => OrgChild4, (orgChild4) => orgChild4.orgChild1)
orgChild4s: OrgChild4[];
@OneToMany(() => PermissionOrg, (permissionOrg) => permissionOrg.orgRootTree)
permissionOrgRoots: PermissionOrg[];
}
export class CreateOrgRoot {