orbitx-core-models 11.154.0 → 11.155.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"wallet.model.d.ts","sourceRoot":"","sources":["../../src/models/wallet.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAqCzD,eAAO,MAAM,MAAM;;;;OAAkD,CAAC;AACtE,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"wallet.model.d.ts","sourceRoot":"","sources":["../../src/models/wallet.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAuCzD,eAAO,MAAM,MAAM;;;;OAAkD,CAAC;AACtE,eAAe,MAAM,CAAC"}
@@ -36,10 +36,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.Wallet = void 0;
37
37
  const mongoose_1 = __importStar(require("mongoose"));
38
38
  const walletSchema = new mongoose_1.Schema({
39
+ // Can go below zero: a commission payout reversed after the partner already withdrew it is
40
+ // taken back in full, leaving a negative ("owed") balance that the next payout settles first.
41
+ // Withdrawals still require balance >= amount, so an owed balance can't be withdrawn.
39
42
  balance: {
40
43
  type: Number,
41
44
  default: 0,
42
- min: 0,
43
45
  },
44
46
  pendingWithdrawalAmount: {
45
47
  type: Number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orbitx-core-models",
3
- "version": "11.154.0",
3
+ "version": "11.155.0",
4
4
  "description": "Shared Mongoose models and interfaces for OrbitX services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",