Move db models to db folder

This commit is contained in:
Alex Holliday committed 2024-10-01 10:01:25 +08:00
1 parent 34389d4878
commit 6c598b976f
29 files changed
+31 -30

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
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);