22 lines
601 B
TypeScript
22 lines
601 B
TypeScript
|
|
import { Entity, Column, ManyToMany } from "typeorm";
|
||
|
|
import { EntityBase } from "./base/Base";
|
||
|
|
import { Profile } from "./Profile";
|
||
|
|
import { ProfileEmployee } from "./ProfileEmployee";
|
||
|
|
|
||
|
|
@Entity("roleKeycloak")
|
||
|
|
export class RoleKeycloak extends EntityBase {
|
||
|
|
@Column({
|
||
|
|
nullable: true,
|
||
|
|
comment: "ชื่อ role",
|
||
|
|
length: 255,
|
||
|
|
default: null,
|
||
|
|
})
|
||
|
|
name: string;
|
||
|
|
|
||
|
|
@ManyToMany(() => Profile, (profile) => profile.roleKeycloaks)
|
||
|
|
profiles: Profile[];
|
||
|
|
|
||
|
|
@ManyToMany(() => ProfileEmployee, (profileEmployee) => profileEmployee.roleKeycloaks)
|
||
|
|
profileEmployees: ProfileEmployee[];
|
||
|
|
}
|