12 lines
260 B
TypeScript
12 lines
260 B
TypeScript
import { Entity, PrimaryGeneratedColumn, ManyToOne } from 'typeorm';
|
|
import { User } from './user.entity';
|
|
|
|
@Entity()
|
|
export class RefreshToken {
|
|
@PrimaryGeneratedColumn()
|
|
id: number;
|
|
|
|
@ManyToOne(() => User, (user) => user.refreshTokens)
|
|
user: User;
|
|
}
|