mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-13 05:09:51 -06:00
29 lines
589 B
JavaScript
29 lines
589 B
JavaScript
const mongoose = require('mongoose')
|
|
|
|
const CheckSchema = mongoose.Schema(
|
|
{
|
|
monitorId: {
|
|
type: mongoose.Schema.Types.ObjectId,
|
|
ref: 'Monitor',
|
|
immutable: true,
|
|
},
|
|
status: {
|
|
type: Boolean,
|
|
},
|
|
responseTime: {
|
|
type: Number, // milliseconds
|
|
},
|
|
statusCode: {
|
|
type: Number, // 200, ... , 500
|
|
},
|
|
message: {
|
|
type: String,
|
|
}
|
|
},
|
|
{
|
|
timestamps: true,
|
|
}
|
|
);
|
|
|
|
module.exports = mongoose.model('Check', CheckSchema);
|