ojamoto_models 1.0.11 → 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,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
async up(queryInterface, Sequelize) {
|
|
5
|
+
await queryInterface.addColumn("escrows", "seller_proceeds", {
|
|
6
|
+
type: Sequelize.DECIMAL(15, 2),
|
|
7
|
+
allowNull: true,
|
|
8
|
+
after: "platform_fee",
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
async down(queryInterface) {
|
|
13
|
+
await queryInterface.removeColumn("escrows", "seller_proceeds");
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -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
|
@@ -79,6 +79,21 @@ module.exports = (sequelize) => {
|
|
|
79
79
|
defaultValue: 0.0,
|
|
80
80
|
comment: "AutoParts NG escrow fee",
|
|
81
81
|
},
|
|
82
|
+
seller_proceeds: {
|
|
83
|
+
type: DataTypes.DECIMAL(15, 2),
|
|
84
|
+
allowNull: true,
|
|
85
|
+
comment: "Amount minus platform fee",
|
|
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
|
+
},
|
|
82
97
|
currency: {
|
|
83
98
|
type: DataTypes.STRING(3),
|
|
84
99
|
allowNull: false,
|