ojamoto_models 1.0.9 → 1.0.10
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,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
async up(queryInterface, Sequelize) {
|
|
5
|
+
await queryInterface.addColumn("users", "cac_verified", {
|
|
6
|
+
type: Sequelize.BOOLEAN,
|
|
7
|
+
allowNull: false,
|
|
8
|
+
defaultValue: false,
|
|
9
|
+
after: "nin_verified",
|
|
10
|
+
comment: "Business sellers only",
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
await queryInterface.addColumn("kyc_verifications", "cac_data_json", {
|
|
14
|
+
type: Sequelize.JSON,
|
|
15
|
+
allowNull: true,
|
|
16
|
+
after: "bank_data_json",
|
|
17
|
+
comment: "Raw CAC API response from provider",
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
await queryInterface.addColumn(
|
|
21
|
+
"kyc_verifications",
|
|
22
|
+
"verification_attempts",
|
|
23
|
+
{
|
|
24
|
+
type: Sequelize.INTEGER,
|
|
25
|
+
allowNull: false,
|
|
26
|
+
defaultValue: 0,
|
|
27
|
+
after: "cac_data_json",
|
|
28
|
+
},
|
|
29
|
+
);
|
|
30
|
+
},
|
|
31
|
+
async down(queryInterface) {
|
|
32
|
+
await queryInterface.removeColumn("users", "cac_verified");
|
|
33
|
+
await queryInterface.removeColumn("kyc_verifications", "cac_data_json");
|
|
34
|
+
await queryInterface.removeColumn(
|
|
35
|
+
"kyc_verifications",
|
|
36
|
+
"verification_attempts",
|
|
37
|
+
);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -37,6 +37,15 @@ module.exports = (sequelize) => {
|
|
|
37
37
|
allowNull: true,
|
|
38
38
|
comment: "Resolved account name and bank details",
|
|
39
39
|
},
|
|
40
|
+
cac_data_json: {
|
|
41
|
+
type: DataTypes.JSON,
|
|
42
|
+
allowNull: true,
|
|
43
|
+
},
|
|
44
|
+
verification_attempts: {
|
|
45
|
+
type: DataTypes.INTEGER,
|
|
46
|
+
allowNull: false,
|
|
47
|
+
defaultValue: 0,
|
|
48
|
+
},
|
|
40
49
|
verification_status: {
|
|
41
50
|
type: DataTypes.ENUM(...Object.values(KYC_STATUS)),
|
|
42
51
|
allowNull: false,
|
package/models/User.js
CHANGED
|
@@ -184,7 +184,13 @@ module.exports = (sequelize) => {
|
|
|
184
184
|
nin_verified: {
|
|
185
185
|
type: DataTypes.BOOLEAN,
|
|
186
186
|
defaultValue: false,
|
|
187
|
-
comment: "Sellers
|
|
187
|
+
comment: "Buyers and Individual Sellers",
|
|
188
|
+
},
|
|
189
|
+
cac_verified: {
|
|
190
|
+
type: DataTypes.BOOLEAN,
|
|
191
|
+
allowNull: false,
|
|
192
|
+
defaultValue: false,
|
|
193
|
+
comment: "Business sellers only",
|
|
188
194
|
},
|
|
189
195
|
bank_verified: {
|
|
190
196
|
type: DataTypes.BOOLEAN,
|