Files
Checkmate/Server/models/Notification.js
2024-07-30 12:54:35 -07:00

27 lines
459 B
JavaScript

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);