From 4186fb51f66043b221237c7ba91ac5a95a4f32b0 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 2 Dec 2020 02:22:38 +0300 Subject: feat: add log model --- lib/log.schema.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/log.schema.ts (limited to 'lib/log.schema.ts') diff --git a/lib/log.schema.ts b/lib/log.schema.ts new file mode 100644 index 0000000..3c55de7 --- /dev/null +++ b/lib/log.schema.ts @@ -0,0 +1,15 @@ +import { Schema, Types, Document } from 'mongoose'; + +export interface LogDocument extends Document { + eventId: string; + message: string; +} + +const schema = new Schema({ + eventId: Types.ObjectId, + message: String +}, { timestamps: true }); + + +export default schema; + -- cgit v1.2.3