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

16 lines
392 B
TypeScript
Raw Normal View History

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