18 lines
358 B
TypeScript
18 lines
358 B
TypeScript
|
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
|
||
|
import { user } from "./user";
|
||
|
|
||
|
@Entity()
|
||
|
export class refresh {
|
||
|
@PrimaryColumn({ generated: "increment", type: "int" })
|
||
|
id: number;
|
||
|
|
||
|
@Column({ type: "varchar", length: 255 })
|
||
|
token: string;
|
||
|
|
||
|
@Column({ type: "datetime" })
|
||
|
expiry: Date;
|
||
|
|
||
|
@ManyToOne(() => user)
|
||
|
user: user;
|
||
|
}
|