2024-08-26 11:47:08 +00:00
|
|
|
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
|
2024-08-27 15:54:59 +00:00
|
|
|
import { PermissionString } from "../type/permissionTypes";
|
|
|
|
import { role } from "./role";
|
2024-08-26 11:47:08 +00:00
|
|
|
|
|
|
|
@Entity()
|
2024-08-27 15:54:59 +00:00
|
|
|
export class rolePermission {
|
2024-08-26 11:47:08 +00:00
|
|
|
@PrimaryColumn({ type: "int" })
|
2024-08-27 15:54:59 +00:00
|
|
|
roleId: number;
|
2024-08-26 11:47:08 +00:00
|
|
|
|
|
|
|
@PrimaryColumn({ type: "varchar", length: 255 })
|
|
|
|
permission: PermissionString;
|
|
|
|
|
2024-08-27 15:54:59 +00:00
|
|
|
@ManyToOne(() => role)
|
|
|
|
role: role;
|
2024-08-26 11:47:08 +00:00
|
|
|
}
|