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 +})