From 9ab23583551c495d3a212ef24a47696a8da460d2 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Mon, 27 Jul 2020 04:10:57 -0700 Subject: big revamp n stuff --- server/src/database/models/GuildModel.ts | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 server/src/database/models/GuildModel.ts (limited to 'server/src/database/models/GuildModel.ts') diff --git a/server/src/database/models/GuildModel.ts b/server/src/database/models/GuildModel.ts new file mode 100644 index 0000000..de079ec --- /dev/null +++ b/server/src/database/models/GuildModel.ts @@ -0,0 +1,36 @@ +import { Document, Schema, model } from 'mongoose'; + +export interface Guild extends Document { + id: string; + prefix: string; + premium: boolean; + expiresAt: Date; + darling?: string; + welcome?: string; + goodbye?: string; + fanart?: string; +} + +const Guild: Schema = new Schema({ + id: String, + prefix: String, + premium: Boolean, + expiresAt: Date, + darling: { + required: false, + type: String + }, + welcome: { + required: false, + type: String + }, + goodbye: { + required: false, + type: String + }, + fanart: { + required: false, + type: String + } +}, { strict: false }); +export default model('Guild', Guild); \ No newline at end of file -- cgit v1.2.3