duration
This commit is contained in:
1 parent
dc0e198a8e
commit
f0b152fc8f
10 files changed
+142
-72
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { Schema, model, type Types } from "mongoose";
|
||||
import type { MaintenanceWindow } from "@/types/maintenanceWindow.js";
|
||||
import type { MaintenanceWindow, DurationUnit } from "@/types/maintenanceWindow.js";
|
||||
|
||||
type MaintenanceWindowDocumentBase = Omit<MaintenanceWindow, "id" | "monitorId" | "teamId" | "start" | "end" | "createdAt" | "updatedAt"> & {
|
||||
monitorId: Types.ObjectId;
|
||||
@@ -34,6 +34,13 @@ const MaintenanceWindowSchema = new Schema<MaintenanceWindowDocument>(
|
||||
name: {
|
||||
type: String,
|
||||
},
|
||||
duration: {
|
||||
type: Number,
|
||||
},
|
||||
durationUnit: {
|
||||
type: String,
|
||||
enum: ["seconds", "minutes", "hours", "days"],
|
||||
},
|
||||
repeat: {
|
||||
type: Number,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user