mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-25 06:37:45 -06:00
feat: Save chatwoot creds
This commit is contained in:
25
src/whatsapp/models/chatwoot.model.ts
Normal file
25
src/whatsapp/models/chatwoot.model.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Schema } from 'mongoose';
|
||||
import { dbserver } from '../../db/db.connect';
|
||||
|
||||
export class ChatwootRaw {
|
||||
_id?: string;
|
||||
account_id?: string;
|
||||
token?: string;
|
||||
url?: string;
|
||||
name_inbox?: string;
|
||||
}
|
||||
|
||||
const chatwootSchema = new Schema<ChatwootRaw>({
|
||||
_id: { type: String, _id: true },
|
||||
account_id: { type: String, required: true },
|
||||
token: { type: String, required: true },
|
||||
url: { type: String, required: true },
|
||||
name_inbox: { type: String, required: true },
|
||||
});
|
||||
|
||||
export const ChatwootModel = dbserver?.model(
|
||||
ChatwootRaw.name,
|
||||
chatwootSchema,
|
||||
'chatwoot',
|
||||
);
|
||||
export type IChatwootModel = typeof ChatwootModel;
|
||||
Reference in New Issue
Block a user