Skip to content

Instantly share code, notes, and snippets.

@acomito
Created August 11, 2019 12:54
Show Gist options
  • Save acomito/45f9032341c90ec13883712fa2489fde to your computer and use it in GitHub Desktop.
Save acomito/45f9032341c90ec13883712fa2489fde to your computer and use it in GitHub Desktop.
collections/Users/model.js
import Mongo from 'modules/mongodb';
const EmailModel = new Mongo.Schema({
address: String
});
const schema = new Mongo.Schema({
id: String,
emails: [EmailModel]
});
const Users = Mongo.model('Users', schema);
export default Users;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment