next/models/quickMenu.ts

26 lines
538 B
TypeScript
Raw Normal View History

2023-10-03 01:22:43 -04:00
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 {
2023-10-03 01:22:43 -04:00
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,
2023-10-03 01:22:43 -04:00
divider: Boolean,
});