MOOver.js/database/schemas.js

36 lines
661 B
JavaScript
Raw Normal View History

2023-02-25 12:42:21 +00:00
const mongoose = require('mongoose');
const birthdaySchema = new mongoose.Schema({
id: {
type: String,
unique: true,
},
day: Number,
month: Number,
nickname: {
type: String,
default: '',
},
});
const bdmodel = mongoose.model('birthdays', birthdaySchema);
const eventSchema = new mongoose.Schema({
guild: String,
id: {
type: Number,
index: true,
unique: true,
},
name: String,
day: Number,
month: Number,
specialMessage: String,
2023-02-25 12:42:21 +00:00
});
const emodel = mongoose.model('events', eventSchema);
2023-02-25 12:42:21 +00:00
module.exports = {
bModel: bdmodel,
eModel: emodel,
2023-02-25 12:42:21 +00:00
};