mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 19:32:21 -06:00
init project evolution api
This commit is contained in:
17
src/whatsapp/models/webhook.model.ts
Normal file
17
src/whatsapp/models/webhook.model.ts
Normal 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;
|
||||
Reference in New Issue
Block a user