后端实现权限验证
This commit is contained in:
@@ -25,3 +25,7 @@ export class UserSession {
|
||||
@DeleteDateColumn({ nullable: true, precision: 3 })
|
||||
deletedAt: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* 考虑是否使用sessionId代替id,以节省存储空间
|
||||
*/
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Role } from 'src/auth/role.enum';
|
||||
import {
|
||||
BeforeInsert,
|
||||
Column,
|
||||
@@ -84,4 +85,7 @@ export class User {
|
||||
|
||||
@DeleteDateColumn({ nullable: true, precision: 3 })
|
||||
deletedAt: Date;
|
||||
|
||||
@Column('simple-array', { default: '' })
|
||||
roles: Role[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user