24 lines
587 B
TypeScript
24 lines
587 B
TypeScript
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
|
|
);
|