2024-08-22 09:40:31 +00:00
|
|
|
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
|
|
|
|
import { user } from "./user";
|
|
|
|
|
|
|
|
@Entity()
|
|
|
|
export class refresh {
|
2024-08-25 08:09:57 +00:00
|
|
|
@PrimaryColumn({ type: "varchar", length: 255 })
|
2024-08-22 09:40:31 +00:00
|
|
|
token: string;
|
|
|
|
|
2024-08-25 08:09:57 +00:00
|
|
|
@PrimaryColumn({ type: "int" })
|
|
|
|
userId: number;
|
|
|
|
|
2024-08-22 09:40:31 +00:00
|
|
|
@Column({ type: "datetime" })
|
|
|
|
expiry: Date;
|
|
|
|
|
|
|
|
@ManyToOne(() => user)
|
|
|
|
user: user;
|
|
|
|
}
|