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