initial commit

This commit is contained in:
2024-10-13 14:50:19 +00:00
commit dbdbf16bfe
34 changed files with 3035 additions and 0 deletions

22
models/GiveawayMsg.ts Normal file
View File

@@ -0,0 +1,22 @@
import {Schema, Types, model} from 'mongoose';
import {Guild} from './Guild';
export interface GiveawayMsg{
_id: Types.ObjectId;
guild: Guild;
messageId: string;
authorId: string;
userIds: string[];
}
const giveawayMsgSchema = new Schema<GiveawayMsg>({
guild: {type: Schema.Types.ObjectId, required: true},
messageId: {type: String, required: true},
authorId: {type: String, required: true},
userIds: {type: [{type: String}], default: []}
});
export const giveawayMsgModel = model<GiveawayMsg>(
'giveawayMsgModel', giveawayMsgSchema
);