chore(backend): convert basic RefreshToken model to TypeORM entity (#2401)
* chore: convert basic RefreshToken model to TypeORM entity Co-authored-by: v1b3m <vibenjamin6@gmail.com> * Fix import Co-authored-by: v1b3m <vibenjamin6@gmail.com> --------- Co-authored-by: v1b3m <vibenjamin6@gmail.com>
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import { Entity, Column, PrimaryGeneratedColumn, OneToMany } from 'typeorm';
|
||||
|
||||
import { RefreshToken } from 'src/coreV2/refresh-token/refresh-token.entity';
|
||||
|
||||
@Entity('users')
|
||||
export class User {
|
||||
@ -16,4 +18,7 @@ export class User {
|
||||
|
||||
@Column({ default: false })
|
||||
emailVerified: boolean;
|
||||
|
||||
@OneToMany(() => RefreshToken, (refreshToken) => refreshToken.user)
|
||||
refreshTokens: RefreshToken[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user