discord-multipurpose-bot/models/Leaderboard.js

14 lines
429 B
JavaScript
Raw Permalink Normal View History

const mongoose = require("mongoose");
const leaderboardSchema = new mongoose.Schema({
userId: { type: String, required: true },
username: { type: String, required: true },
gamesPlayed: { type: Number, default: 0 },
correctAnswers: { type: Number, default: 0 },
2024-09-07 11:32:03 +01:00
streak: { type: Number, default: 0 },
});
const Leaderboard = mongoose.model("Leaderboard", leaderboardSchema);
module.exports = Leaderboard;