feat: Database Query Cache

This commit is contained in:
Samuel
2023-03-18 04:11:48 +01:00
parent 6c009c3b88
commit 366c4935a4
38 changed files with 444 additions and 126 deletions
+2 -2
View File
@@ -17,12 +17,12 @@
*/
import { Column, Entity, JoinColumn, ManyToOne } from "typeorm";
import { BaseClass } from "./BaseClass";
import { EntityCache } from "../cache";
import { User } from "./User";
import crypto from "crypto";
@Entity("backup_codes")
export class BackupCode extends BaseClass {
export class BackupCode extends EntityCache {
@JoinColumn({ name: "user_id" })
@ManyToOne(() => User, { onDelete: "CASCADE" })
user: User;