code: function Domain(options) {
    EventEmitter.call(this);
  
    options = options || {};
  
    if (!options.domainPath) {
      var err = new Error('Please provide domainPath or domainLoader in options');
      debug(err);
      throw err;
    }
  
    options.retryOnConcurrencyTimeout = options.retryOnConcurrencyTimeout || 800;
  
    options.commandRejectedEventName = options.commandRejectedEventName || 'commandRejected';
  
    options.snapshotThreshold = options.snapshotThreshold || 100;
  
    options.useLoaderExtensions = options.useLoaderExtensions || false;
  
    this.structureLoader = createStructureLoader(options.structureLoader);
  
    this.eventStore = createEventStore(options.eventStore);
  
    this.aggregateLock = createAggregateLock(options.aggregateLock);
  
    if (options.deduplication) {
      this.commandBumper = createCommandBumper(options.deduplication);
    }
  
    this.options = options;
  
    this.definitions = {
      command: {
        id: 'id',
        name: 'name',
        aggregateId: 'aggregate.id'
  //      context: 'context.name',        // optional
  //      aggregate: 'aggregate.name',    // optional
  //      payload: 'payload',             // optional
  //      revision: 'revision',           // optional
  //      version: 'version',             // optional
  //      meta: 'meta'                    // optional (will be passed directly to corresponding event(s))
      },
      event: {
        correlationId: 'correlationId',
        id: 'id',
        name: 'name',
        aggregateId: 'aggregate.id',
  //      context: 'context.name',        // optional
  //      aggregate: 'aggregate.name',    // optional
        payload: 'payload',               // optional
        revision: 'revision'              // optional
  //      version: 'version',             // optional
  //      meta: 'meta'                    // optional (will be passed directly from corresponding command)
      }
    };
  
    this.idGenerator(function () {
      return uuid().toString();
    });
  
    this.onEvent(function (evt) {
      debug('emit:', evt);
    });
  
    this.extendValidator(function (validator) {
      debug('no validator extension defined');
    });
  }
docs: Domain constructor
  @param {Object} options The options.
  @constructor