@@ -0,0 +1,15 @@
+'use strict';
+const { Decimal128 } = require('mongoose').Types;
+module.exports = exports = function metaPlugin(schema /* , options*/) {
+ schema.add({
+ money: {
+ type: Decimal128,
+ set(data) {
+ return data;
+ },
+ get(data) {
+ if (data) return data.toString() * 1;
+ });
+};