Files
Checkmate/Server/models/Notification.js
T

26 lines
459 B
JavaScript
Raw Normal View History

2024-07-30 12:54:35 -07:00
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);