initial commit
This commit is contained in:
23
models/Guild.ts
Normal file
23
models/Guild.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import {Schema, Types, model} from 'mongoose';
|
||||
|
||||
import {GiveawayMsg} from './GiveawayMsg';
|
||||
import {AutoroleMsg} from './AutoroleMsg';
|
||||
|
||||
export interface Guild{
|
||||
_id: Types.ObjectId;
|
||||
id: string;
|
||||
name: string;
|
||||
giveawayLogChannelId: string;
|
||||
autoroleLogChannelId: string;
|
||||
}
|
||||
|
||||
const guildSchema = new Schema<Guild>({
|
||||
id: {type: String, required: true},
|
||||
name: {type: String, required: true},
|
||||
giveawayLogChannelId: {type: String, required: false},
|
||||
autoroleLogChannelId: {type: String, required: false},
|
||||
});
|
||||
|
||||
export const guildModel = model<Guild>(
|
||||
'guildModel', guildSchema
|
||||
);
|
||||
Reference in New Issue
Block a user