Move thresholds from Notification to Monitor

This commit is contained in:
Alex Holliday committed 2025-06-19 12:10:07 +08:00
1 parent f9e0930336
commit 7e5521eb13
2 files changed
+62 -35

No files matched your search

-28
View File
@@ -28,34 +28,6 @@ const NotificationSchema = mongoose.Schema(
phone: {
type: String,
},
alertThreshold: {
type: Number,
default: 5,
},
cpuAlertThreshold: {
type: Number,
default: function () {
return this.alertThreshold;
},
},
memoryAlertThreshold: {
type: Number,
default: function () {
return this.alertThreshold;
},
},
diskAlertThreshold: {
type: Number,
default: function () {
return this.alertThreshold;
},
},
tempAlertThreshold: {
type: Number,
default: function () {
return this.alertThreshold;
},
},
},
{
timestamps: true,