docs: function genModel(service) {
          var model = function (data) {
              this.data = data;
          };
  
          model.prototype.save = function () {
              return (this.data && this.data._id) ?
                  service.update({ data: this.data }) :
                  service.create({ data: this.data });
          };
  
          angular.extend(model, service);
  
          //for (var methodName in service) {
          //    if (service.hasOwnProperty(methodName)) {
          //        model[methodName] = genModelMethod(methodName, service[methodName]);
          //    }
          //}
  
          return model;
      }