code: function compilePlainObject (schema, options) {
    class PlainModelInstance extends PlainBaseModel {
      constructor (data, options = {}) {
        super(data, options, schema)
      }
    }
  
    PlainModelInstance.schema = schema
  
    // if the user wants to allow modifications
    if (options.freeze !== false) {
      Object.freeze(PlainModelInstance)
    }
  
    return PlainModelInstance
  }
docs: Compiles a schema into a Model
  @param schema
  @param options
  @returns {ObjectInstance}
  @private