firearch
Advanced tools
Comparing version 0.0.1018 to 0.0.1019
14
model.js
@@ -287,2 +287,16 @@ const { asyncForEach } = require('./utils'); | ||
schema() { | ||
const schema = {}; | ||
for (const key in this._modelSchema._fieldDefs) { | ||
// console.log(key); | ||
if (typeof this._modelSchema._fieldDefs[key] === 'function') { | ||
schema[key] = this._modelSchema._fieldDefs[key].name; | ||
} else { | ||
schema[key] = this._modelSchema._fieldDefs[key]; | ||
} | ||
} | ||
return schema; | ||
} | ||
}; |
{ | ||
"name": "firearch", | ||
"version": "0.0.1018", | ||
"version": "0.0.1019", | ||
"description": "Schema modeling for Firestore", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
34949
635