SchemaBufferOptions.js 745 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. 'use strict';
  2. const SchemaTypeOptions = require('./SchemaTypeOptions');
  3. /**
  4. * The options defined on a Buffer schematype.
  5. *
  6. * #### Example:
  7. *
  8. * const schema = new Schema({ bitmap: Buffer });
  9. * schema.path('bitmap').options; // SchemaBufferOptions instance
  10. *
  11. * @api public
  12. * @inherits SchemaTypeOptions
  13. * @constructor SchemaBufferOptions
  14. */
  15. class SchemaBufferOptions extends SchemaTypeOptions {}
  16. const opts = require('./propertyOptions');
  17. /**
  18. * Set the default subtype for this buffer.
  19. *
  20. * @api public
  21. * @property subtype
  22. * @memberOf SchemaBufferOptions
  23. * @type Number
  24. * @instance
  25. */
  26. Object.defineProperty(SchemaBufferOptions.prototype, 'subtype', opts);
  27. /*!
  28. * ignore
  29. */
  30. module.exports = SchemaBufferOptions;