UNPKG

@topgroup/diginext

Version:

A BUILD SERVER & CLI to deploy apps to any Kubernetes clusters.

23 lines (22 loc) 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NotificationModel = exports.notificationSchema = void 0; const mongoose_1 = require("mongoose"); const SystemTypes_1 = require("../interfaces/SystemTypes"); const Base_1 = require("./Base"); exports.notificationSchema = new mongoose_1.Schema({ ...Base_1.baseSchemaDefinitions, name: String, message: String, url: String, events: [{ type: String, enum: SystemTypes_1.systemEventList }], status: { type: String, enum: SystemTypes_1.webhookEventStatusList }, from: { type: mongoose_1.Schema.Types.ObjectId, ref: "users" }, channels: [{ type: String, enum: SystemTypes_1.webhookChannelList }], // webhook webhook: { type: mongoose_1.Schema.Types.ObjectId, ref: "webhooks" }, // timing readAt: { type: Date }, references: { type: mongoose_1.Schema.Types.Mixed }, }, { collection: "notifications", timestamps: true }); exports.NotificationModel = (0, mongoose_1.model)("Notification", exports.notificationSchema, "notifications");