Files
Checkmate/Server/db/models/Notification.js
T
Alex Holliday f057807b56 migrate to esm
2024-10-15 11:57:37 +08:00

25 lines
450 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);