1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 16:30:58 -05:00
Daggerbot-TS/src/models/MPServer.ts

25 lines
728 B
TypeScript
Raw Normal View History

2023-04-14 06:47:58 -04:00
import TClient from '../client.js';
2023-02-26 18:45:56 -05:00
import mongoose from 'mongoose';
const Schema = mongoose.model('mpserver', new mongoose.Schema({
_id: {type: String, required:true},
2023-08-15 06:47:31 -04:00
mainServer: {required:true, type: new mongoose.Schema({
ip: {type: String, required:true},
code: {type: String, required:true}
}, {versionKey: false})},
secondServer: {required:true, type: new mongoose.Schema({
ip: {type: String, required:true},
code: {type: String, required:true}
}, {versionKey: false})},
2023-02-26 18:45:56 -05:00
}, {versionKey: false}));
export default class MPServer extends Schema {
client: TClient;
_content: typeof Schema;
constructor(client:TClient){
super();
this.client = client;
this._content = Schema;
}
}