diff --git a/README.md b/README.md index 2fb1d944c..2e1022c31 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,9 @@ Example: | Name | Type | Notes | | ----------------- | --------- | ------------------------------------------------- | -| checkId | `string` | Unique ID for the check | +| checkId | `string` | Unique ID for the associated check | +| monitorId | `string` | Unique ID for the associated monitor | +| userId | `string` | Unique ID for the associated user | | status | `boolean` | Indicates the service is Up or Down | | message | `string` | Message for the user about the down service | | notifiedStatus | `boolean` | Indicates whether the user is notified | diff --git a/Server/models/Alert.js b/Server/models/Alert.js index 72705d947..758a7eba2 100644 --- a/Server/models/Alert.js +++ b/Server/models/Alert.js @@ -7,6 +7,16 @@ const AlertSchema = mongoose.Schema( ref: 'Check', immutable: true, }, + monitorId: { + type: mongoose.Schema.Types.ObjectId, + ref: 'Monitor', + immutable: true, + }, + userId: { + type: mongoose.Schema.Types.ObjectId, + ref: 'User', + immutable: true, + }, status: { type: Boolean, },