From 171da19be85b7d42d9306f1406e5cf272dce4fff Mon Sep 17 00:00:00 2001 From: Matthew R Date: Tue, 5 May 2020 19:13:27 -0400 Subject: [PATCH] add Redirect db model --- src/models/Redirect.ts | 13 +++++++++++++ src/models/index.ts | 1 + 2 files changed, 14 insertions(+) create mode 100644 src/models/Redirect.ts diff --git a/src/models/Redirect.ts b/src/models/Redirect.ts new file mode 100644 index 0000000..18b8dd1 --- /dev/null +++ b/src/models/Redirect.ts @@ -0,0 +1,13 @@ +import { Document, Schema, model } from 'mongoose'; + +export interface RedirectInterface extends Document { + key: string, + to: string, +} + +const Redirect: Schema = new Schema({ + key: String, + to: String, +}); + +export default model('Redirect', Redirect); diff --git a/src/models/index.ts b/src/models/index.ts index 81202ce..77bf216 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -1,2 +1,3 @@ export { default as Member, MemberInterface } from './Member'; export { default as Moderation, ModerationInterface } from './Moderation'; +export { default as Redirect, RedirectInterface } from './Redirect';