var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import DockerHost from "./DockerHost";
import Host from "./Host";
import KubernetesCluster from "./KubernetesCluster";
import Label from "./Label";
import Monitor from "./Monitor";
import MonitorStatus from "./MonitorStatus";
import Project from "./Project";
import ScheduledMaintenanceState from "./ScheduledMaintenanceState";
import Service from "./Service";
import StatusPage from "./StatusPage";
import User from "./User";
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
import Route from "../../Types/API/Route";
import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
import AccessControlColumn from "../../Types/Database/AccessControlColumn";
import ColumnLength from "../../Types/Database/ColumnLength";
import ColumnType from "../../Types/Database/ColumnType";
import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
import EnableDocumentation from "../../Types/Database/EnableDocumentation";
import EnableWorkflow from "../../Types/Database/EnableWorkflow";
import MultiTenentQueryAllowed from "../../Types/Database/MultiTenentQueryAllowed";
import SlugifyColumn from "../../Types/Database/SlugifyColumn";
import TableColumn from "../../Types/Database/TableColumn";
import TableColumnType from "../../Types/Database/TableColumnType";
import TableMetadata from "../../Types/Database/TableMetadata";
import TenantColumn from "../../Types/Database/TenantColumn";
import IconProp from "../../Types/Icon/IconProp";
import ObjectID from "../../Types/ObjectID";
import Permission from "../../Types/Permission";
import { Column, Entity, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, } from "typeorm";
import Recurring from "../../Types/Events/Recurring";
import TableBillingAccessControl from "../../Types/Database/AccessControl/TableBillingAccessControl";
import { PlanType } from "../../Types/Billing/SubscriptionPlan";
let ScheduledMaintenanceTemplate = class ScheduledMaintenanceTemplate extends BaseModel {
    constructor() {
        super(...arguments);
        this.project = undefined;
        this.projectId = undefined;
        this.templateName = undefined;
        this.templateDescription = undefined;
        this.title = undefined;
        this.description = undefined;
        this.slug = undefined;
        this.createdByUser = undefined;
        this.createdByUserId = undefined;
        this.deletedByUser = undefined;
        this.deletedByUserId = undefined;
        this.monitors = undefined; // monitors affected by this scheduledMaintenance.
        this.hosts = undefined;
        this.kubernetesClusters = undefined;
        this.dockerHosts = undefined;
        this.services = undefined;
        this.statusPages = undefined; // visible on which status page?
        this.labels = undefined;
        this.changeMonitorStatusTo = undefined;
        this.changeMonitorStatusToId = undefined;
        // RECURRING EVENT PROPS
        this.firstEventScheduledAt = undefined;
        this.firstEventStartsAt = undefined;
        this.firstEventEndsAt = undefined;
        this.recurringInterval = undefined;
        this.isRecurringEvent = undefined;
        this.scheduleNextEventAt = undefined;
        // Recurring Props End.
        this.shouldStatusPageSubscribersBeNotifiedOnEventCreated = undefined;
        this.shouldStatusPageSubscribersBeNotifiedWhenEventChangedToOngoing = undefined;
        this.shouldStatusPageSubscribersBeNotifiedWhenEventChangedToEnded = undefined;
        this.customFields = undefined;
        this.sendSubscriberNotificationsOnBeforeTheEvent = undefined;
    }
};
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "projectId",
        type: TableColumnType.Entity,
        modelType: Project,
        title: "Project",
        description: "Relation to Project Resource in which this object belongs",
    }),
    ManyToOne(() => {
        return Project;
    }, {
        eager: false,
        nullable: true,
        onDelete: "CASCADE",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "projectId" }),
    __metadata("design:type", Project)
], ScheduledMaintenanceTemplate.prototype, "project", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: true,
        canReadOnRelationQuery: true,
        title: "Project ID",
        description: "ID of your OneUptime Project in which this object belongs",
        example: "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: false,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], ScheduledMaintenanceTemplate.prototype, "projectId", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        required: true,
        type: TableColumnType.ShortText,
        canReadOnRelationQuery: true,
        title: "Name",
        description: "Name of the Scheduled Maintenance Template",
        example: "Database Upgrade Template",
    }),
    Column({
        nullable: false,
        type: ColumnType.ShortText,
        length: ColumnLength.ShortText,
    }),
    __metadata("design:type", String)
], ScheduledMaintenanceTemplate.prototype, "templateName", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        required: true,
        type: TableColumnType.LongText,
        canReadOnRelationQuery: true,
        title: "Template Description",
        description: "Description of the Scheduled Maintenance Template",
        example: "Use this template for scheduled database upgrades and migrations. Includes pre-maintenance notifications, maintenance window updates, and post-maintenance completion notifications.",
    }),
    Column({
        nullable: false,
        type: ColumnType.LongText,
        length: ColumnLength.LongText,
    }),
    __metadata("design:type", String)
], ScheduledMaintenanceTemplate.prototype, "templateDescription", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    Index(),
    TableColumn({
        required: true,
        type: TableColumnType.ShortText,
        canReadOnRelationQuery: true,
        title: "Title",
        description: "Title of this scheduled event.",
        example: "Scheduled Database Maintenance - PostgreSQL Upgrade",
    }),
    Column({
        nullable: false,
        type: ColumnType.ShortText,
        length: ColumnLength.ShortText,
    }),
    __metadata("design:type", String)
], ScheduledMaintenanceTemplate.prototype, "title", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.Markdown,
        title: "Description",
        description: "Description of this scheduled event that will show up on Status Page. This is a markdown field.",
        example: "## Scheduled Maintenance\n\nWe will be performing a scheduled upgrade of our PostgreSQL database servers.\n\n**Start Time:** 2:00 AM UTC\n**Expected Duration:** 2 hours\n\n**Impact:** Brief service interruptions may occur during the maintenance window.\n\nThank you for your patience.",
    }),
    Column({
        nullable: true,
        type: ColumnType.Markdown,
    }),
    __metadata("design:type", String)
], ScheduledMaintenanceTemplate.prototype, "description", void 0);
__decorate([
    Index(),
    ColumnAccessControl({
        create: [],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [],
    }),
    TableColumn({
        required: true,
        unique: true,
        type: TableColumnType.Slug,
        computed: true,
        title: "Slug",
        description: "Friendly globally unique name for your object",
        example: "database-upgrade-template",
    }),
    Column({
        nullable: false,
        type: ColumnType.Slug,
        length: ColumnLength.Slug,
        unique: true,
    }),
    __metadata("design:type", String)
], ScheduledMaintenanceTemplate.prototype, "slug", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "createdByUserId",
        type: TableColumnType.Entity,
        modelType: User,
        title: "Created by User",
        description: "Relation to User who created this object (if this object was created by a User)",
    }),
    ManyToOne(() => {
        return User;
    }, {
        eager: false,
        nullable: true,
        onDelete: "SET NULL",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "createdByUserId" }),
    __metadata("design:type", User)
], ScheduledMaintenanceTemplate.prototype, "createdByUser", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [],
    }),
    TableColumn({
        type: TableColumnType.ObjectID,
        title: "Created by User ID",
        description: "User ID who created this object (if this object was created by a User)",
        example: "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], ScheduledMaintenanceTemplate.prototype, "createdByUserId", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "deletedByUserId",
        type: TableColumnType.Entity,
        title: "Deleted by User",
        modelType: User,
        description: "Relation to User who deleted this object (if this object was deleted by a User)",
    }),
    ManyToOne(() => {
        return User;
    }, {
        cascade: false,
        eager: false,
        nullable: true,
        onDelete: "SET NULL",
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "deletedByUserId" }),
    __metadata("design:type", User)
], ScheduledMaintenanceTemplate.prototype, "deletedByUser", void 0);
__decorate([
    ColumnAccessControl({
        create: [],
        read: [],
        update: [],
    }),
    TableColumn({
        type: TableColumnType.ObjectID,
        title: "Deleted by User ID",
        description: "User ID who deleted this object (if this object was deleted by a User)",
        example: "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], ScheduledMaintenanceTemplate.prototype, "deletedByUserId", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.EntityArray,
        modelType: Monitor,
        title: "Monitors",
        description: "List of monitors attached to this event",
    }),
    ManyToMany(() => {
        return Monitor;
    }, { eager: false }),
    JoinTable({
        name: "ScheduledMaintenanceTemplateMonitor",
        inverseJoinColumn: {
            name: "monitorId",
            referencedColumnName: "_id",
        },
        joinColumn: {
            name: "scheduledMaintenanceTemplateId",
            referencedColumnName: "_id",
        },
    }),
    __metadata("design:type", Array)
], ScheduledMaintenanceTemplate.prototype, "monitors", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.EntityArray,
        modelType: Host,
        title: "Hosts",
        description: "List of hosts to pre-populate on scheduled maintenance events created from this template.",
    }),
    ManyToMany(() => {
        return Host;
    }, { eager: false }),
    JoinTable({
        name: "ScheduledMaintenanceTemplateHost",
        inverseJoinColumn: {
            name: "hostId",
            referencedColumnName: "_id",
        },
        joinColumn: {
            name: "scheduledMaintenanceTemplateId",
            referencedColumnName: "_id",
        },
    }),
    __metadata("design:type", Array)
], ScheduledMaintenanceTemplate.prototype, "hosts", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.EntityArray,
        modelType: KubernetesCluster,
        title: "Kubernetes Clusters",
        description: "List of Kubernetes clusters to pre-populate on scheduled maintenance events created from this template.",
    }),
    ManyToMany(() => {
        return KubernetesCluster;
    }, { eager: false }),
    JoinTable({
        name: "ScheduledMaintenanceTemplateKubernetesCluster",
        inverseJoinColumn: {
            name: "kubernetesClusterId",
            referencedColumnName: "_id",
        },
        joinColumn: {
            name: "scheduledMaintenanceTemplateId",
            referencedColumnName: "_id",
        },
    }),
    __metadata("design:type", Array)
], ScheduledMaintenanceTemplate.prototype, "kubernetesClusters", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.EntityArray,
        modelType: DockerHost,
        title: "Docker Hosts",
        description: "List of Docker hosts to pre-populate on scheduled maintenance events created from this template.",
    }),
    ManyToMany(() => {
        return DockerHost;
    }, { eager: false }),
    JoinTable({
        name: "ScheduledMaintenanceTemplateDockerHost",
        inverseJoinColumn: {
            name: "dockerHostId",
            referencedColumnName: "_id",
        },
        joinColumn: {
            name: "scheduledMaintenanceTemplateId",
            referencedColumnName: "_id",
        },
    }),
    __metadata("design:type", Array)
], ScheduledMaintenanceTemplate.prototype, "dockerHosts", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.EntityArray,
        modelType: Service,
        title: "Services",
        description: "List of services to pre-populate on scheduled maintenance events created from this template.",
    }),
    ManyToMany(() => {
        return Service;
    }, { eager: false }),
    JoinTable({
        name: "ScheduledMaintenanceTemplateService",
        inverseJoinColumn: {
            name: "serviceId",
            referencedColumnName: "_id",
        },
        joinColumn: {
            name: "scheduledMaintenanceTemplateId",
            referencedColumnName: "_id",
        },
    }),
    __metadata("design:type", Array)
], ScheduledMaintenanceTemplate.prototype, "services", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.EntityArray,
        modelType: StatusPage,
        title: "Status Pages",
        description: "List of status pages to show this event on",
    }),
    ManyToMany(() => {
        return StatusPage;
    }, { eager: false }),
    JoinTable({
        name: "ScheduledMaintenanceTemplateStatusPage",
        inverseJoinColumn: {
            name: "statusPageId",
            referencedColumnName: "_id",
        },
        joinColumn: {
            name: "scheduledMaintenanceTemplateId",
            referencedColumnName: "_id",
        },
    }),
    __metadata("design:type", Array)
], ScheduledMaintenanceTemplate.prototype, "statusPages", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        required: false,
        type: TableColumnType.EntityArray,
        modelType: Label,
        title: "Labels",
        description: "Relation to Labels Array where this object is categorized in.",
    }),
    ManyToMany(() => {
        return Label;
    }, { eager: false }),
    JoinTable({
        name: "ScheduledMaintenanceTemplateLabel",
        inverseJoinColumn: {
            name: "labelId",
            referencedColumnName: "_id",
        },
        joinColumn: {
            name: "scheduledMaintenanceTemplateId",
            referencedColumnName: "_id",
        },
    }),
    __metadata("design:type", Array)
], ScheduledMaintenanceTemplate.prototype, "labels", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [],
    }),
    TableColumn({
        manyToOneRelationColumn: "changeMonitorStatusToId",
        type: TableColumnType.Entity,
        modelType: ScheduledMaintenanceState,
        title: "Change Monitor Status To",
        description: "Relation to Monitor Status Object. All monitors connected to this event will be changed to this status when the event is ongoing.",
    }),
    ManyToOne(() => {
        return MonitorStatus;
    }, {
        eager: false,
        nullable: true,
        orphanedRowAction: "nullify",
    }),
    JoinColumn({ name: "changeMonitorStatusToId" }),
    __metadata("design:type", MonitorStatus)
], ScheduledMaintenanceTemplate.prototype, "changeMonitorStatusTo", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    Index(),
    TableColumn({
        type: TableColumnType.ObjectID,
        required: false,
        title: "Change Monitor Status To ID",
        description: "Relation to Monitor Status Object ID. All monitors connected to this incident will be changed to this status when the event is ongoing.",
        example: "d4e5f6a7-b8c9-4d0e-1f2a-3b4c5d6e7f8a",
    }),
    Column({
        type: ColumnType.ObjectID,
        nullable: true,
        transformer: ObjectID.getDatabaseTransformer(),
    }),
    __metadata("design:type", ObjectID)
], ScheduledMaintenanceTemplate.prototype, "changeMonitorStatusToId", void 0);
__decorate([
    TableColumn({
        title: "Schedule First Event At",
        type: TableColumnType.Date,
        required: false,
        description: "When would you like to schedule the first event?",
        example: "2024-03-15T02:00:00.000Z",
    }),
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    Column({
        nullable: true,
        type: ColumnType.Date,
    }),
    __metadata("design:type", Date)
], ScheduledMaintenanceTemplate.prototype, "firstEventScheduledAt", void 0);
__decorate([
    TableColumn({
        title: "First Event Start At",
        type: TableColumnType.Date,
        required: false,
        description: "When does the first event start?",
        example: "2024-03-15T02:00:00.000Z",
    }),
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    Column({
        nullable: true,
        type: ColumnType.Date,
    }),
    __metadata("design:type", Date)
], ScheduledMaintenanceTemplate.prototype, "firstEventStartsAt", void 0);
__decorate([
    TableColumn({
        title: "First Event Ends At",
        type: TableColumnType.Date,
        required: false,
        description: "When does the first event end?",
        example: "2024-03-15T04:00:00.000Z",
    }),
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    Column({
        nullable: true,
        type: ColumnType.Date,
    }),
    __metadata("design:type", Date)
], ScheduledMaintenanceTemplate.prototype, "firstEventEndsAt", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        type: TableColumnType.JSON,
        title: "Recurring Interval",
        description: "How often should this event recur?",
        example: { intervalType: "weeks", intervalCount: 2 },
    }),
    Column({
        type: ColumnType.JSON,
        nullable: true,
        transformer: Recurring.getDatabaseTransformer(),
    }),
    __metadata("design:type", Recurring)
], ScheduledMaintenanceTemplate.prototype, "recurringInterval", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceNoteTemplate,
        ],
    }),
    TableColumn({
        isDefaultValueColumn: false,
        type: TableColumnType.Boolean,
        title: "Is Recurring Event",
        description: "Is this a recurring event?",
        example: true,
    }),
    Column({
        type: ColumnType.Boolean,
        default: false,
    }),
    __metadata("design:type", Boolean)
], ScheduledMaintenanceTemplate.prototype, "isRecurringEvent", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceNoteTemplate,
        ],
    }),
    TableColumn({
        isDefaultValueColumn: false,
        type: TableColumnType.Date,
        computed: true,
        title: "Schedule Next Event At",
        description: "When is the next event scheduled?",
        example: "2024-03-29T02:00:00.000Z",
    }),
    Column({
        type: ColumnType.Date,
        nullable: true,
    }),
    __metadata("design:type", Date)
], ScheduledMaintenanceTemplate.prototype, "scheduleNextEventAt", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceNoteTemplate,
        ],
    }),
    TableColumn({
        isDefaultValueColumn: true,
        type: TableColumnType.Boolean,
        title: "Should subscribers be notified when event is created?",
        description: "Should subscribers be notified about this event creation?",
        defaultValue: true,
        example: true,
    }),
    Column({
        type: ColumnType.Boolean,
        default: true,
    }),
    __metadata("design:type", Boolean)
], ScheduledMaintenanceTemplate.prototype, "shouldStatusPageSubscribersBeNotifiedOnEventCreated", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceNoteTemplate,
        ],
    }),
    TableColumn({
        isDefaultValueColumn: true,
        type: TableColumnType.Boolean,
        title: "Should subscribers be notified when event is changed to ongoing?",
        description: "Should subscribers be notified about this event event is changed to ongoing?",
        defaultValue: true,
        example: true,
    }),
    Column({
        type: ColumnType.Boolean,
        default: true,
    }),
    __metadata("design:type", Boolean)
], ScheduledMaintenanceTemplate.prototype, "shouldStatusPageSubscribersBeNotifiedWhenEventChangedToOngoing", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceNoteTemplate,
        ],
    }),
    TableColumn({
        isDefaultValueColumn: true,
        type: TableColumnType.Boolean,
        title: "Should subscribers be notified when event is changed to ended?",
        description: "Should subscribers be notified about this event event is changed to ended?",
        defaultValue: true,
        example: true,
    }),
    Column({
        type: ColumnType.Boolean,
        default: true,
    }),
    __metadata("design:type", Boolean)
], ScheduledMaintenanceTemplate.prototype, "shouldStatusPageSubscribersBeNotifiedWhenEventChangedToEnded", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        isDefaultValueColumn: false,
        required: false,
        type: TableColumnType.JSON,
        title: "Custom Fields",
        description: "Custom Fields on this resource.",
        example: {
            department: "DevOps",
            maintenanceType: "upgrade",
            approvalRequired: true,
        },
    }),
    Column({
        type: ColumnType.JSON,
        nullable: true,
    }),
    __metadata("design:type", Object)
], ScheduledMaintenanceTemplate.prototype, "customFields", void 0);
__decorate([
    ColumnAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    TableColumn({
        type: TableColumnType.JSON,
        required: false,
        isDefaultValueColumn: false,
        title: "Subscriber notifications before the event",
        description: "Should subscribers be notified before the event?",
        example: [
            { intervalType: "hours", intervalCount: 24 },
            { intervalType: "hours", intervalCount: 1 },
        ],
    }),
    Column({
        type: ColumnType.JSON,
        nullable: true,
        transformer: Recurring.getDatabaseTransformer(),
    }),
    __metadata("design:type", Array)
], ScheduledMaintenanceTemplate.prototype, "sendSubscriberNotificationsOnBeforeTheEvent", void 0);
ScheduledMaintenanceTemplate = __decorate([
    TableBillingAccessControl({
        create: PlanType.Growth,
        read: PlanType.Growth,
        update: PlanType.Growth,
        delete: PlanType.Growth,
    }),
    EnableDocumentation(),
    AccessControlColumn("labels"),
    MultiTenentQueryAllowed(true),
    TenantColumn("projectId"),
    TableAccessControl({
        create: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.CreateScheduledMaintenanceTemplate,
        ],
        read: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.Viewer,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.ScheduledMaintenanceViewer,
            Permission.ReadScheduledMaintenanceTemplate,
        ],
        delete: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.DeleteScheduledMaintenanceTemplate,
        ],
        update: [
            Permission.ProjectOwner,
            Permission.ProjectAdmin,
            Permission.ProjectMember,
            Permission.ScheduledMaintenanceAdmin,
            Permission.ScheduledMaintenanceMember,
            Permission.EditScheduledMaintenanceTemplate,
        ],
    }),
    CrudApiEndpoint(new Route("/scheduled-maintenance-template")),
    SlugifyColumn("name", "slug"),
    Entity({
        name: "ScheduledMaintenanceTemplate",
    }),
    EnableWorkflow({
        create: true,
        delete: true,
        update: true,
        read: true,
    }),
    TableMetadata({
        singularName: "Scheduled Maintenance Template",
        pluralName: "Scheduled Maintenance Templates",
        icon: IconProp.Clock,
        tableName: "ScheduledMaintenanceTemplate",
        tableDescription: "Manage scheduled maintenance templates for your project",
    })
], ScheduledMaintenanceTemplate);
export default ScheduledMaintenanceTemplate;
//# sourceMappingURL=ScheduledMaintenanceTemplate.js.map