import { Schema } from 'mongoose'; import model, { Event } from '../lib/event.model'; interface Context { message: string; } export type CustomEvent = Event; const contextSchema = new Schema({ message: String }); const CustomEventModel = model('CustomEvent', contextSchema); export default CustomEventModel;