aboutsummaryrefslogtreecommitdiff
path: root/lib/log.model.ts
blob: 1904d1567dd7ce48c0e88fcbe09d09e9076eb7a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { model, Model } from 'mongoose';
import schema, { LogDocument } from './log.schema';
import Connection from './connection';

export type LogModel = Model<LogDocument>;

const createLogModel = (connection: Connection): LogModel => {
  return connection.model<LogDocument, LogModel>('Log', schema);
};


export default createLogModel;