ff-admin-server/src/entity/role_permission.ts

15 lines
378 B
TypeScript

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;
}