This commit is contained in:
Alex Holliday committed 2026-02-04 22:55:54 +00:00
1 parent dc0e198a8e
commit f0b152fc8f
10 files changed
+142 -72

No files matched your search

+8 -1
View File
@@ -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,
},