summaryrefslogtreecommitdiff
path: root/server/src/database/models/GuildModel.ts
diff options
context:
space:
mode:
author8cy <[email protected]>2020-07-27 04:10:57 -0700
committer8cy <[email protected]>2020-07-27 04:10:57 -0700
commit9ab23583551c495d3a212ef24a47696a8da460d2 (patch)
treeff8b1de500f3a17dad78d6d6fee381f45078723f /server/src/database/models/GuildModel.ts
parentfix: formatting in wc/gb json files (diff)
downloaddep-core-9ab23583551c495d3a212ef24a47696a8da460d2.tar.xz
dep-core-9ab23583551c495d3a212ef24a47696a8da460d2.zip
big revamp n stuff
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