Alberto Maturano 154fc28a57 Normalize to standar file permissions
As a result of taking a look on PR #1967 I realized there is 819
executable files in this repository. It is obvious this is an error.
2018-09-24 12:33:09 -05:00

47 lines
965 B
JavaScript

'use strict';
/**
* Module dependencies
*/
module.exports = mongoose => {
require('mongoose-float').loadType(mongoose);
return {
convertType: mongooseType => {
switch (mongooseType.toLowerCase()) {
case 'array':
return Array;
case 'boolean':
return 'Boolean';
case 'binary':
return 'Buffer';
case 'date':
case 'datetime':
case 'time':
case 'timestamp':
return Date;
case 'decimal':
return 'Float';
case 'float':
return mongoose.Schema.Types.Decimal128;
case 'json':
return 'Mixed';
case 'biginteger':
case 'integer':
return 'Number';
case 'uuid':
return 'ObjectId';
case 'email':
case 'enumeration':
case 'password':
case 'string':
case 'text':
return 'String';
default:
}
}
};
};