code: function(options) {
          options = options || {};
          var model = this;
  
          var triggerDestroy = function() {
            model.trigger('destroy', model, model.collection, options);
          };
  
          if (!this.id) {
            return triggerDestroy();
          }
  
          if (!options.wait) {
            triggerDestroy();
          }
  
          var request = _request(
            'classes',
            this.className,
            this.id,
            'DELETE',
            this._flags,
            options
          );
          return request.then(function() {
            if (options.wait) {
              triggerDestroy();
            }
            return model;
          });
        }
docs: Destroy this model on the server if it was already persisted.
  Optimistically removes the model from its collection, if it has one.
  @param {AuthOptions} options AuthOptions plus:
  @param {Boolean} [options.wait] wait for the server to respond
  before removal.
  
  @return {Promise} A promise that is fulfilled when the destroy
  completes.