init project evolution api

This commit is contained in:
Davidson Gomes
2023-06-09 07:48:59 -03:00
commit 2a1c426311
90 changed files with 9820 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { Schema } from 'mongoose';
import { dbserver } from '../../db/db.connect';
export class WebhookRaw {
_id?: string;
url?: string;
enabled?: boolean;
}
const webhookSchema = new Schema<WebhookRaw>({
_id: { type: String, _id: true },
url: { type: String, required: true },
enabled: { type: Boolean, required: true },
});
export const WebhookModel = dbserver?.model(WebhookRaw.name, webhookSchema, 'webhook');
export type IWebhookModel = typeof WebhookModel;