committed

This commit is contained in:
2025-01-10 13:03:41 +05:30
parent 4ba496b8eb
commit 52f746308f
17 changed files with 1689 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
const mongoose = require('mongoose');
const userSchema = new mongoose.Schema({
userId: { type: String, required: true, unique: true },
preferences: {
channels: [{ type: String, enum: ['email', 'sms', 'push'] }],
quietHours: {
start: { type: String, match: /^([01]\d|2[0-3]):([0-5]\d)$/ },
end: { type: String, match: /^([01]\d|2[0-3]):([0-5]\d)$/ }
},
notificationLimit: { type: Number, default: 3 }
}
});
module.exports = mongoose.model('User', userSchema);