mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-26 23:27:45 -06:00
wip
This commit is contained in:
@@ -3,22 +3,18 @@ import { Schema } from 'mongoose';
|
||||
import { dbserver } from '../../db/db.connect';
|
||||
|
||||
export class SettingsRaw {
|
||||
_id?: string;
|
||||
reject_call?: boolean;
|
||||
msg_call?: string;
|
||||
groups_ignore?: boolean;
|
||||
_id?: string;
|
||||
reject_call?: boolean;
|
||||
msg_call?: string;
|
||||
groups_ignore?: boolean;
|
||||
}
|
||||
|
||||
const settingsSchema = new Schema<SettingsRaw>({
|
||||
_id: { type: String, _id: true },
|
||||
reject_call: { type: Boolean, required: true },
|
||||
msg_call: { type: String, required: true },
|
||||
groups_ignore: { type: Boolean, required: true },
|
||||
_id: { type: String, _id: true },
|
||||
reject_call: { type: Boolean, required: true },
|
||||
msg_call: { type: String, required: true },
|
||||
groups_ignore: { type: Boolean, required: true },
|
||||
});
|
||||
|
||||
export const SettingsModel = dbserver?.model(
|
||||
SettingsRaw.name,
|
||||
settingsSchema,
|
||||
'settings',
|
||||
);
|
||||
export const SettingsModel = dbserver?.model(SettingsRaw.name, settingsSchema, 'settings');
|
||||
export type ISettingsModel = typeof SettingsModel;
|
||||
|
||||
Reference in New Issue
Block a user