title: Importing a custom mongoose schema in another schema
body: <p>My software has a mongoose Schema, let's call it <code>carSchema</code>, and I am exporting a model of the <code>carSchema</code> called <code>Car</code>. Example:</p>
  
  <pre><code>/* Car.js */
  var carSchema= new Schema({
      _id: Schema.Types.ObjectId,
      type: String,
      wheels: Number
  });
  
  carSchema.statics.drive = async function(){
      ...
  }
  
  module.exports = mongoose.model('Car', carSchema);
  </code></pre>
  
  <p>Now say my software has another schema called <code>lotSchema</code> in another file, that uses carSchema in it:</p>
  
  <pre><code>/* Lot.js */
  var lotSchema = new Schema({
      _id: Schema.Types.ObjectId,
      carArr: [carSchema]
  });
  
  lotSchema.statics.getAllId = async function(){
      return carSchema[0]['_id']
  }
  </code></pre>
  
  <p>How can I properly import or export <code>carSchema</code> for use in <code>lotSchema</code>? Would a simple <code>const carSchema = require('Car.js')</code> suffice?</p>