summaryrefslogtreecommitdiff
path: root/server/src/database/models/GuildModel.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/database/models/GuildModel.ts')
-rw-r--r--server/src/database/models/GuildModel.ts36
1 files changed, 36 insertions, 0 deletions
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', Guild); \ No newline at end of file