15 lines
378 B
TypeScript
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;
|
|
}
|