aboutsummaryrefslogtreecommitdiff
path: root/lib/client.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/client.ts')
-rw-r--r--lib/client.ts21
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;
+