实现权限管理的服务

This commit is contained in:
2025-05-08 22:26:04 +08:00
parent ff4c755fc8
commit 1b73ef6bc9
5 changed files with 59 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
import { Entity, Index, PrimaryColumn } from "typeorm";
@Entity()
@Index(['roleId', 'permissionId'])
@Index(['roleId', 'permissionId'], { unique: true })
export class RolePermission {
@PrimaryColumn('uuid')
roleId: string;

View File

@@ -7,4 +7,7 @@ export class Role {
@Column({ unique: true })
name: string;
@Column()
localName: string;
}