UNPKG

@brontosaurus/db

Version:
41 lines (40 loc) 874 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WebhookModel = void 0; const mongoose_1 = require("mongoose"); const WebhookSchema = new mongoose_1.Schema({ active: { type: Boolean, required: true, default: true, }, anchor: { type: String, required: true, unique: true, index: true, }, name: { type: String, required: true, unique: true, }, description: { type: String, }, url: { type: String, required: true, }, hooks: { type: [String], required: true, default: [], }, }, { timestamps: { createdAt: true, updatedAt: true, }, }); exports.WebhookModel = mongoose_1.model('Webhook', WebhookSchema);