mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-26 07:07:45 -06:00
19 lines
467 B
TypeScript
19 lines
467 B
TypeScript
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;
|