Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //import the mongoose package
- const mongoose = require('mongoose');
- //get the Schema class
- const Schema = mongoose.Schema;
- const CompanySchema = new Schema({
- name: {
- required: true,
- type: String
- },
- city: String,
- address: String
- });
- module.exports = mongoose.model('Company', CompanySchema);
Add Comment
Please, Sign In to add comment