add permission profile
This commit is contained in:
parent
dc9ac66896
commit
af3e0abd2a
5 changed files with 725 additions and 38 deletions
|
|
@ -12,12 +12,12 @@ export class OFFICER {
|
|||
// })
|
||||
// RET_YEAR: string;
|
||||
|
||||
// @Column({
|
||||
// nullable: true,
|
||||
// type: "text",
|
||||
// default: null,
|
||||
// })
|
||||
// ID: string;
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
ID: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
|
|
@ -172,4 +172,18 @@ export class OFFICER {
|
|||
default: null,
|
||||
})
|
||||
ADMIN_NAME: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
POS_NUM_CODE_SIT: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
POS_NUM_CODE_SIT_ABB: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import { PosMaster } from "./PosMaster";
|
|||
import { PermissionOrg } from "./PermissionOrg";
|
||||
import { EmployeePosMaster } from "./EmployeePosMaster";
|
||||
import { EmployeeTempPosMaster } from "./EmployeeTempPosMaster";
|
||||
import { PermissionProfile } from "./PermissionProfile";
|
||||
|
||||
enum OrgRootRank {
|
||||
DEPARTMENT = "DEPARTMENT",
|
||||
|
|
@ -192,6 +193,9 @@ export class OrgRoot extends EntityBase {
|
|||
|
||||
@OneToMany(() => PermissionOrg, (permissionOrg) => permissionOrg.orgRootTree)
|
||||
permissionOrgRoots: PermissionOrg[];
|
||||
|
||||
@OneToMany(() => PermissionProfile, (permissionProfile) => permissionProfile.orgRootTree)
|
||||
permissionProfileRoots: PermissionProfile[];
|
||||
}
|
||||
|
||||
export class CreateOrgRoot {
|
||||
|
|
@ -300,4 +304,4 @@ export class UpdateOrgRoot {
|
|||
|
||||
@Column()
|
||||
misId?: string;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
27
src/entities/PermissionProfile.ts
Normal file
27
src/entities/PermissionProfile.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { OrgRoot } from "./OrgRoot";
|
||||
import { Profile } from "./Profile";
|
||||
|
||||
@Entity("permissionProfile")
|
||||
export class PermissionProfile extends EntityBase {
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง orgRoot",
|
||||
})
|
||||
orgRootId: string;
|
||||
|
||||
@Column({
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง profile",
|
||||
})
|
||||
profileId: string;
|
||||
|
||||
@ManyToOne(() => OrgRoot, (orgRoot) => orgRoot.permissionProfileRoots)
|
||||
@JoinColumn({ name: "orgRootId" })
|
||||
orgRootTree: OrgRoot;
|
||||
|
||||
@ManyToOne(() => Profile, (profile) => profile.permissionProfiles)
|
||||
@JoinColumn({ name: "profileId" })
|
||||
profileTree: Profile;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue