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,
|
2023-02-28 22:48:15 +00:00
|
|
|
specialMessage: String,
|
2023-02-25 12:42:21 +00:00
|
|
|
});
|
|
|
|
|
2023-02-28 22:48:15 +00:00
|
|
|
const emodel = mongoose.model('events', eventSchema);
|
2023-02-25 12:42:21 +00:00
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
bModel: bdmodel,
|
2023-02-28 22:48:15 +00:00
|
|
|
eModel: emodel,
|
2023-02-25 12:42:21 +00:00
|
|
|
};
|