feat(db/models): create quick menu model

recreating v1's customizable quick menu feature
This commit is contained in:
parent cd64636715
commit dc250771ed
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

25
models/quickMenu.ts Normal file

@ -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<QuickMenuItem>({
index: Number,
// @ts-ignore SHUT UP BITCH I KNOW WHAT I'M DOING
title: String,
url: String,
divider: Boolean
})