UNPKG

openhim-core

Version:

The OpenHIM core application that provides logging and routing of http requests

53 lines (45 loc) 977 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AlertModel = exports.AlertModelAPI = void 0; var _mongoose = require("mongoose"); var _config = require("../config"); const AlertSchema = new _mongoose.Schema({ user: { type: String, required: true }, method: { type: String, required: true }, timestamp: { type: Date, required: true, default: Date.now, expires: '1d' }, channelID: { type: String, required: true }, condition: { type: String, required: true }, status: { type: String, required: true }, alertStatus: { type: String, required: true, enum: ['Failed', 'Completed'] } }); const AlertModelAPI = _config.connectionAPI.model('Alert', AlertSchema); exports.AlertModelAPI = AlertModelAPI; const AlertModel = _config.connectionDefault.model('Alert', AlertSchema); exports.AlertModel = AlertModel; //# sourceMappingURL=alerts.js.map