From dc250771ede1bd255f61963e6687a30420d9a03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Mon, 25 Sep 2023 19:47:21 -0400 Subject: [PATCH] feat(db/models): create quick menu model recreating v1's customizable quick menu feature --- models/quickMenu.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 models/quickMenu.ts diff --git a/models/quickMenu.ts b/models/quickMenu.ts new file mode 100644 index 0000000..0fecc7f --- /dev/null +++ b/models/quickMenu.ts @@ -0,0 +1,25 @@ +import mongoose, {connect, PopulatedDoc, Document} from "mongoose"; +const {Schema, model} = mongoose; + +interface IAbstractQM { + index: number; +} + +interface IQuickMenuLink extends IAbstractQM { + title: string; + url: string; +} + +interface IQuickMenuDiv extends IAbstractQM { + divider: boolean +} + +export type QuickMenuItem = IQuickMenuDiv | IQuickMenuLink; + +export const QuickMenuSchema = new Schema({ + index: Number, + // @ts-ignore SHUT UP BITCH I KNOW WHAT I'M DOING + title: String, + url: String, + divider: Boolean +})