加入权限模块、用户模块加入userRole实体
This commit is contained in:
23
tone-page-server/src/user/entities/user-role.entity.ts
Normal file
23
tone-page-server/src/user/entities/user-role.entity.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
@Index(['userId', 'roleId'])
|
||||
export class UserRole {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column('uuid')
|
||||
roleId: string;
|
||||
|
||||
@Column('uuid')
|
||||
userId: string
|
||||
|
||||
@Column()
|
||||
isEnabled: boolean;
|
||||
|
||||
@CreateDateColumn({ precision: 3 })
|
||||
createdAt: Date;
|
||||
|
||||
@Column({ nullable: true, precision: 3 })
|
||||
expiredAt?: Date;
|
||||
}
|
||||
Reference in New Issue
Block a user