diff options
Diffstat (limited to 'lib/client.ts')
-rw-r--r-- | lib/client.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/client.ts b/lib/client.ts new file mode 100644 index 0000000..eafdda5 --- /dev/null +++ b/lib/client.ts @@ -0,0 +1,21 @@ +import { Schema } from 'mongoose'; +import Connection from './connection'; +import createEventModel, { EventModel } from './event.model'; +import createLogModel, { LogModel } from './log.model'; + + +class Client<Context> { + public connection: Connection; + public Event: EventModel<Context>; + public Log: LogModel; + + constructor(connection: Connection, contextSchema: Schema) { + this.connection = connection; + this.Log = createLogModel(connection); + this.Event = createEventModel<Context>(connection, contextSchema); + } +} + + +export default Client; + |