'use strict';

var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

var {Name}Schema = new Schema({
    // active: {type: Boolean, default: true},
    // name: {type: String},
    createdAt: {type: Date, default: Date.now},
    updatedAt: {type: Date, default: Date.now}
}, {
    strict: false
});

if (!{Name}Schema.options.toJSON) {
    {Name}Schema.options.toJSON = {};
}

{Name}Schema.options.toJSON.transform = function (doc, ret, options) {
    ret.id = ret._id;
    delete ret._id;
    delete ret.__v;
};

mongoose.model('{Name}', {Name}Schema);

@@ -107,16 +107,94 @@
 chema(%7B%0A
+    // org: %7Btype: Schema.ObjectId, ref: 'Org', required: true, index: true%7D,%0A
     // a

update model with ref example