import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm"; import { PermissionString } from "../type/permissionTypes"; import { role } from "./role"; @Entity() export class rolePermission { @PrimaryColumn({ type: "int" }) roleId: number; @PrimaryColumn({ type: "varchar", length: 255 }) permission: PermissionString; @ManyToOne(() => role) role: role; }