code: function preRegister() {
    _3.default._currencies.forEach(c => {
      _User2.default.underscoreMethod(c.value, 'income', async function (amount, title, type) {
        let user = this;
        let balance = user.get(c.value) + amount || 0;
        if (c.precision !== undefined) {
          balance = _lodash2.default.round(balance, c.precision);
        }
        user.set(c.value, balance);
        let income = new _Income2.default({
          type,
          title,
          amount,
          balance,
          target: 'balance',
          currency: c.value,
          user
        });
        await income.save();
        await user.save();
      });
      if (_User2.default.fields[c.value]) return;
      _User2.default.fields[c.value] = {
        label: c.label,
        type: Number,
        default: 0,
        addonAfter: c.unit
      };
    });
  }
docs: 为User模型增加余额字段和income方法