title: How to export multiple Schemas in same file in mongoose
body: <p>I want to export two schemas in my model js file and I want use in router js file. I have tried this code below.</p>
  
  <p><strong>This is my certification.js file(models)</strong></p>
  
  <pre><code>const mongoose = require('mongoose');
  const Schema = mongoose.schema;
  
  const requestCertificationSchema = mongoose.Schema({
   userid: { type: String, require: true },
   certName: { type: String, require: true },
   certType: { type: String, require: true },
   examName: { type: String, require: true },
   examYear: { type: String, require: true },
   examIndex: { type: String,  require: true },
   reqDate: {type: String, require: true},
   state: { type: String, require: true}
  });
  
  const requestCertification = mongoose.model("requestCertification", requestCertificationSchema);
  
  module.exports.saveRequest = function (newRequestCertification, callback) {
       newRequestCertification.save(callback);
  };
  
  const requestStudentstatusSchema = mongoose.Schema({
   studentName: { type: String, require: true },
   admissionNum: { type: String, require: true },
   dateofAdmission: { type: String, require: true },
   currentStatus: { type: String, require: true },
   description: { type: String, require: true },
  });
  
  const requestStudentstatus=  mongoose.model("requestStudentstatus", requestStudentstatusSchema);
  
  module.exports = {
    requestCertification: requestCertification,
    requestStudentstatus: requestStudentstatus
  }
  </code></pre>
  
  <p><strong>This is my certification.js file(routes)</strong></p>
  
  <pre><code>const router = express.Router();
  const Certification = require('../models/certification');
  const config = require('../config/database');
  
  router.post("/requestCert", function (req, res) {
      const newRequest = new requestCertification({
          userid: req.body.userid,
          certName: req.body.certName,
          certType: req.body.certType,
          examName: req.body.examName,
          examYear: req.body.examYear,
          examIndex: req.body.examIndex,
          reqDate:req.body.reqDate,
          state: req.body.state
      });
      console.log(newRequest);
      Certification.requestCertification.saveRequest(newRequest, function (err, request) {
          if (err) {
              res.json({ state: false, msg: "Data inserting Unsuccessfull..!" });
          }
          if (request) {
              res.json({ state: true, msg: "Data inserted Successfully..!" });
          }
      });
  });
  </code></pre>
  
  <p>When I call this url i have show this error! .</p>
  
  <p><strong>ReferenceError: requestCertification is not defined</strong></p>