mirror of
https://github.com/aydenjahola/discord-multipurpose-bot.git
synced 2024-11-22 08:45:55 +00:00
14 lines
515 B
JavaScript
14 lines
515 B
JavaScript
const mongoose = require("mongoose");
|
|
|
|
const definitionSchema = new mongoose.Schema({
|
|
term: { type: String, required: true, unique: true, trim: true },
|
|
definition: { type: String, required: true },
|
|
example: { type: String, default: "No example provided" },
|
|
author: { type: String, default: "Unknown" },
|
|
thumbs_up: { type: Number, default: 0 },
|
|
thumbs_down: { type: Number, default: 0 },
|
|
});
|
|
|
|
const Definition = mongoose.model("Definition", definitionSchema);
|
|
|
|
module.exports = Definition;
|