Holana/schemas/giveawaysSchema.js

60 lines
1.5 KiB
JavaScript
Raw Normal View History

2023-04-29 09:59:08 +00:00
const mongoose = require('mongoose');
const giveawaySchema = new mongoose.Schema({
messageId: String,
channelId: String,
guildId: String,
startAt: Number,
endAt: Number,
ended: Boolean,
winnerCount: Number,
prize: String,
messages: {
giveaway: String,
giveawayEnded: String,
inviteToParticipate: String,
drawing: String,
dropMessage: String,
winMessage: mongoose.Mixed,
embedFooter: mongoose.Mixed,
noWinner: String,
winners: String,
endedAt: String,
hostedBy: String
},
thumbnail: String,
hostedBy: String,
winnerIds: { type: [String], default: undefined },
reaction: mongoose.Mixed,
botsCanWin: Boolean,
embedColor: mongoose.Mixed,
embedColorEnd: mongoose.Mixed,
exemptPermissions: { type: [], default: undefined },
exemptMembers: String,
bonusEntries: String,
extraData: mongoose.Mixed,
lastChance: {
enabled: Boolean,
content: String,
threshold: Number,
embedColor: mongoose.Mixed
},
pauseOptions: {
isPaused: Boolean,
content: String,
unpauseAfter: Number,
embedColor: mongoose.Mixed,
durationAfterPause: Number,
infiniteDurationText: String
},
isDrop: Boolean,
allowedMentions: {
parse: { type: [String], default: undefined },
users: { type: [String], default: undefined },
roles: { type: [String], default: undefined }
}
}, { id: false });
const giveawayModel = mongoose.model('giveaways', giveawaySchema);
module.exports = giveawayModel;