Merge pull request #81 from bluewave-labs/server/updateAlertModel

Updated the Alert model, ReadMe file
This commit is contained in:
Veysel
2024-05-28 14:44:19 -04:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@@ -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 |

View File

@@ -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,
},