'use strict';

/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
  Schema = mongoose.Schema;

/**
 * Storeroom Schema
 */
var StoreroomSchema = new Schema({
  name: {
    type: String,
    default: '',
    required: 'Please fill Storeroom name',
    trim: true
  },
  created: {
    type: Date,
    default: Date.now
  },
  user: {
    type: Schema.ObjectId,
    ref: 'User'
  }
});

mongoose.model('Storeroom', StoreroomSchema);

@@ -277,16 +277,81 @@
 ue%0A  %7D,%0A
+  parent: %7B%0A    type: Schema.ObjectId,%0A    ref: 'Storeroom'%0A  %7D,%0A
   create

add parent in storeroom-model