mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-20 08:39:43 -06:00
38 lines
580 B
JavaScript
38 lines
580 B
JavaScript
const mongoose = require("mongoose");
|
|
|
|
const MonitorSchema = mongoose.Schema({
|
|
userId: {
|
|
type: String,
|
|
},
|
|
name: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
description: {
|
|
type: String,
|
|
},
|
|
url: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
isActive: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
interval: {
|
|
// in milliseconds
|
|
type: Number,
|
|
default: 60000,
|
|
},
|
|
updated_at: {
|
|
type: Date,
|
|
default: Date.now,
|
|
},
|
|
created_at: {
|
|
type: Date,
|
|
default: Date.now,
|
|
},
|
|
});
|
|
|
|
module.exports = mongoose.model("Monitor", MonitorSchema);
|