1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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);
|