code: function setVirtuals(schema, paths) {
    paths.forEach(path => {
      const props = path.options.virtual.properties;
  
      if (props[path.path]) {
        schema.virtual(props[path.path]).get(function() {
          return path.enumValues;
        });
      }
    });
  }
docs: Setup virtual properties for the document