Files
Checkmate/Server/db/models/Notification.js
T

24 lines
407 B
JavaScript
Raw Normal View History

2024-10-15 11:57:37 +08:00
import mongoose from "mongoose";
2024-07-30 12:54:35 -07:00
const NotificationSchema = mongoose.Schema(
2024-10-17 12:07:30 +08:00
{
monitorId: {
type: mongoose.Schema.Types.ObjectId,
ref: "Monitor",
immutable: true,
},
type: {
type: String,
enum: ["email", "sms"],
},
address: {
type: String,
},
phone: {
type: String,
},
},
{
timestamps: true,
}
2024-07-30 12:54:35 -07:00
);
2024-10-15 11:57:37 +08:00
export default mongoose.model("Notification", NotificationSchema);