mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-11 12:20:04 -06:00
27 lines
459 B
JavaScript
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);
|