23 lines
545 B
TypeScript
23 lines
545 B
TypeScript
import {Schema, Types, model} from 'mongoose';
|
|
|
|
import {Guild} from './Guild';
|
|
|
|
export interface AutoroleMsg{
|
|
_id: Types.ObjectId;
|
|
guild: Guild;
|
|
messageId: string;
|
|
emoji: string;
|
|
roleId: string;
|
|
}
|
|
|
|
const autoroleMsgSchema = new Schema<AutoroleMsg>({
|
|
guild: {type: Schema.Types.ObjectId, required: true},
|
|
messageId: {type: String, required: true},
|
|
emoji: {type: String, required: false},
|
|
roleId: {type: String, required: true},
|
|
});
|
|
|
|
export const autoroleMsgModel = model<AutoroleMsg>(
|
|
'autoroleMsgModel', autoroleMsgSchema
|
|
);
|