Add notification model (#488)

This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-07-30 12:54:35 -07:00
1 parent d135a986a3
commit 4053a6a785
1 file changed
+26
+26
View File
@@ -0,0 +1,26 @@
const mongoose = require("mongoose");
const NotificationSchema = mongoose.Schema(
{
monitorId: {
type: mongoose.Schema.Types.ObjectId,
ref: "Monitor",
immutable: true,
},
type: {
type: String,
enum: ["email", "sms"],
},
address: {
type: String,
},
phone: {
type: String,
},
},
{
timestamps: true,
}
);
module.exports = mongoose.model("Notification", NotificationSchema);