Update HardwareCheck model to include all standard fields

This commit is contained in:
Alex Holliday committed 2024-10-29 13:46:51 +08:00
1 parent a6214f400d
commit b1abe87633
1 file changed
+20
+20
View File
@@ -36,11 +36,31 @@ const HardwareCheckSchema = mongoose.Schema(
type: mongoose.Schema.Types.ObjectId, type: mongoose.Schema.Types.ObjectId,
ref: "Monitor", ref: "Monitor",
immutable: true, immutable: true,
index: true,
}, },
status: { status: {
type: Boolean, type: Boolean,
index: true, index: true,
}, },
responseTime: {
type: Number,
},
statusCode: {
type: Number,
index: true,
},
message: {
type: String,
},
expiry: {
type: Date,
default: Date.now,
expires: 60 * 60 * 24 * 30, // 30 days
},
cpu: { cpu: {
type: cpuSchema, type: cpuSchema,
default: () => ({}), default: () => ({}),