import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm"; import { user } from "./user"; @Entity() export class refresh { @PrimaryColumn({ type: "varchar", length: 255 }) token: string; @PrimaryColumn({ type: "int" }) userId: number; @Column({ type: "datetime" }) expiry: Date; @ManyToOne(() => user) user: user; }