docs: function initModelDelete (args) {
      var controller = this
      var model = this.model
      // if model does not have delete action then do not add
      if (!defined(model.columns.d)) {
          return
      }
      // if model does not have id column then cannot use default controller
      if (!model.columnName('id')) {
          return
      }
      // get accountId column
      var accountIdColumn = model.columnName('accountId') 
      // set role to authenticated if model requires account id
      var role = args.defaultRole || (accountIdColumn && model.columns[accountIdColumn].null === false ? 'authenticated' : 'all')
      // index inputs
      var input = {
          // get current revision of record
          current: 'query.current',
          // get record even if deleted
          deleted: 'query.deleted',
          // ignore conflicts
          force: 'query.force',
          // record id
          id: 'params.id',
          // add option to set meta data for query
          meta: 'query.meta',
          // url to redirect to when done
          redirect: 'params.redirect',
          // http referrer
          referrer: 'headers.referer',
      }
      // record data is in body under model name
      input[model.name] = 'body.'+model.name
      // create path if it does not exist
      if (!defined(this.paths['/:id'])) {
          this.paths['/:id'] = {}
      }
      if (!defined(this.paths['/:id/delete'])) {
          this.paths['/:id/delete'] = {}
      }
      if (!defined(this.paths['/:id/undelete'])) {
          this.paths['/:id/undelete'] = {}
      }
      // add handler for GET /:id/delete and DELETE /:id to delete
      this.paths['/:id'].delete = this.paths['/:id/delete'].get = [
          {
              before: function (args) {
                  // load record
                  return loadRecordForUpdate(controller, args)
              },
              input: input,
              method: function (args) {
                  // perform delete
                  return deleteMethod(controller, 'delete', args)
              },
              role: role,
              methodName: 'delete',
          },
      ]
      // add handler for GET and POST /:id/undelete to undelete
      this.paths['/:id/undelete'].get = this.paths['/:id/undelete'].post = [
          {
              before: function (args) {
                  // load record
                  return loadRecordForUpdate(controller, args)
              },
              input: input,
              method: function (args) {
                  // perform undelete
                  return deleteMethod(controller, 'undelete', args)
              },
              role: role,
              methodName: 'undelete',
          },
      ]
  }