2023-12-29 20:11:07 -05:00
|
|
|
import mongoose from "mongoose";
|
2023-10-03 01:22:43 -04:00
|
|
|
const { Schema, model } = mongoose;
|
2023-09-25 19:47:21 -04:00
|
|
|
|
|
|
|
interface IAbstractQM {
|
|
|
|
index: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IQuickMenuLink extends IAbstractQM {
|
|
|
|
title: string;
|
|
|
|
url: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface IQuickMenuDiv extends IAbstractQM {
|
2023-10-03 01:22:43 -04:00
|
|
|
divider: boolean;
|
2023-09-25 19:47:21 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
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,
|
2023-10-03 01:22:43 -04:00
|
|
|
divider: Boolean,
|
|
|
|
});
|