You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
596 B

  1. // modules
  2. var mongoose = require('../../../lib');
  3. var Schema = mongoose.Schema;
  4. // parse json
  5. var raw = require('./schema.json');
  6. // create a schema
  7. var timeSignatureSchema = Schema(raw);
  8. // compile the model
  9. var TimeSignature = mongoose.model('TimeSignatures', timeSignatureSchema);
  10. // create a TimeSignature document
  11. var threeFour = new TimeSignature({
  12. count: 3,
  13. unit: 4,
  14. description: '3/4',
  15. additive: false,
  16. created: new Date,
  17. links: ['http://en.wikipedia.org/wiki/Time_signature'],
  18. user_id: '518d31a0ef32bbfa853a9814'
  19. });
  20. // print its description
  21. console.log(threeFour);