Files
Checkmate/Server/db/models/Notification.js
2024-10-17 12:07:30 +08:00

25 lines
407 B
JavaScript

import mongoose from "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,
}
);
export default mongoose.model("Notification", NotificationSchema);