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

16 lines
378 B
TypeScript
Raw Normal View History

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