feat: added proxy endpoint

This commit is contained in:
Davidson Gomes
2023-08-07 12:10:33 -03:00
parent 469e696ab7
commit f3cb8c531b
16 changed files with 327 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ export * from './chat.model';
export * from './chatwoot.model';
export * from './contact.model';
export * from './message.model';
export * from './proxy.model';
export * from './rabbitmq.model';
export * from './settings.model';
export * from './typebot.model';

View File

@@ -0,0 +1,18 @@
import { Schema } from 'mongoose';
import { dbserver } from '../../libs/db.connect';
export class ProxyRaw {
_id?: string;
enabled?: boolean;
proxy?: string;
}
const proxySchema = new Schema<ProxyRaw>({
_id: { type: String, _id: true },
enabled: { type: Boolean, required: true },
proxy: { type: String, required: true },
});
export const ProxyModel = dbserver?.model(ProxyRaw.name, proxySchema, 'proxy');
export type IProxyModel = typeof ProxyModel;