ojamoto_models 1.0.12 → 1.0.13

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.
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ module.exports = {
4
+ async up(queryInterface, Sequelize) {
5
+ await queryInterface.addColumn("escrows", "buyer_proceeds", {
6
+ type: Sequelize.DECIMAL(15, 2),
7
+ allowNull: true,
8
+ after: "seller_proceeds",
9
+ comment: "Buyer proceeds after dispute resolved",
10
+ });
11
+
12
+ await queryInterface.addColumn("escrows", "platform_proceeds", {
13
+ type: Sequelize.DECIMAL(15, 2),
14
+ allowNull: true,
15
+ after: "buyer_proceeds",
16
+ comment: "Platform proceeds after dispute resolved",
17
+ });
18
+ },
19
+
20
+ async down(queryInterface) {
21
+ await queryInterface.removeColumn("escrows", "buyer_proceeds");
22
+ await queryInterface.removeColumn("escrows", "platform_proceeds");
23
+ },
24
+ };
package/models/Escrow.js CHANGED
@@ -84,6 +84,16 @@ module.exports = (sequelize) => {
84
84
  allowNull: true,
85
85
  comment: "Amount minus platform fee",
86
86
  },
87
+ buyer_proceeds: {
88
+ type: DataTypes.DECIMAL(15, 2),
89
+ allowNull: true,
90
+ comment: "Buyer proceeds after dispute resolved",
91
+ },
92
+ platform_proceeds: {
93
+ type: DataTypes.DECIMAL(15, 2),
94
+ allowNull: true,
95
+ comment: "Platform proceeds after dispute resolved",
96
+ },
87
97
  currency: {
88
98
  type: DataTypes.STRING(3),
89
99
  allowNull: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ojamoto_models",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "migrate:up": "npx sequelize-cli db:migrate",