const mongoose = require('mongoose'); const Schema = mongoose.Schema; let rolerule = new Schema( { gID: {type: String, required: false, max: 100}, cID: {type: String, required: false, max: 100}, mID: {type:String, required: true,}, roleID:{type:String, required: true}, roleEmoji:{type:String, required:true}, roleName:{type:String, required: true}, } ); const RoleRule = module.exports = mongoose.model('roleRule', rolerule); module.exports.get = (callback, limit)=> { RoleRule.find(callback).limit(limit); }