chore: first commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Entity, ManyToOne, Opt, Property } from "@mikro-orm/core";
|
||||
|
||||
import { User } from "./user.entity";
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
|
||||
@Entity()
|
||||
export class RefreshToken extends BaseEntity {
|
||||
@Property({ type: "varchar", length: 255 })
|
||||
token!: string;
|
||||
|
||||
@ManyToOne(() => User)
|
||||
user!: User;
|
||||
|
||||
@Property({ type: "timestamptz" })
|
||||
expiresAt!: Date;
|
||||
|
||||
@Property({ default: false })
|
||||
isRevoked: boolean & Opt;
|
||||
}
|
||||
Reference in New Issue
Block a user