-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pengyu
committed
Feb 5, 2025
1 parent
a87f9c4
commit bfe31c0
Showing
6 changed files
with
14,681 additions
and
5,213 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Entity, Column, PrimaryGeneratedColumn, ManyToOne, CreateDateColumn } from 'typeorm'; | ||
import { User } from '../../user/user.model'; | ||
|
||
@Entity() | ||
export class RefreshToken { | ||
@PrimaryGeneratedColumn('uuid') | ||
id: string; | ||
|
||
@Column() | ||
token: string; | ||
|
||
@Column() | ||
expiresAt: Date; // Handles token expiration | ||
|
||
@ManyToOne(() => User, { onDelete: 'CASCADE' }) | ||
user: User; | ||
|
||
@Column() | ||
userId: number; | ||
|
||
@CreateDateColumn() | ||
createdAt: Date; | ||
|
||
@Column({ default: false }) | ||
revoked: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.