import { Document, Schema, model } from 'mongoose'; export interface RedirectInterface extends Document { key: string, to: string, visitedCount: number, } export interface RedirectRaw { key: string, to: string, visitedCount: number, } const Redirect: Schema = new Schema({ key: String, to: String, visitedCount: Number, }); export default model('Redirect', Redirect);