Guest User

Untitled

a guest
Feb 25th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. //import the mongoose package
  2. const mongoose = require('mongoose');
  3. //get the Schema class
  4. const Schema = mongoose.Schema;
  5.  
  6. const CompanySchema = new Schema({
  7. name: {
  8. required: true,
  9. type: String
  10. },
  11. city: String,
  12. address: String
  13. });
  14.  
  15. module.exports = mongoose.model('Company', CompanySchema);
Add Comment
Please, Sign In to add comment