import { Column, Entity, ManyToOne, OneToMany, PrimaryColumn } from "typeorm"; import { PermissionObject, PermissionString } from "../../type/permissionTypes"; import { webapi } from "./webapi"; @Entity() export class webapiPermission { @PrimaryColumn({ type: "int" }) webapiId: number; @PrimaryColumn({ type: "varchar", length: 255 }) permission: PermissionString; @ManyToOne(() => webapi, { nullable: false, onDelete: "CASCADE", onUpdate: "RESTRICT", }) webapi: webapi; }