diff options
| author | Adrien Hopkins <[email protected]> | 2022-05-31 15:51:30 -0500 |
|---|---|---|
| committer | Adrien Hopkins <[email protected]> | 2022-05-31 15:51:30 -0500 |
| commit | bea6dda302df971dbf9b4797c95f169cce6dafb3 (patch) | |
| tree | dc806d941945f7ee5f3cee730393fdd175da55e3 /db | |
| parent | ca7224037fb01ded28b51d765e040d5cad36183b (diff) | |
| parent | 510a3bf2f63cb6edbcc9ad24dacdf6faefd80c52 (diff) | |
| download | coinos-server-bea6dda302df971dbf9b4797c95f169cce6dafb3.tar.gz coinos-server-bea6dda302df971dbf9b4797c95f169cce6dafb3.zip | |
Merge branch 'feature-withdrawal-fee'
Diffstat (limited to 'db')
| -rw-r--r-- | db/index.js | 5 | ||||
| -rw-r--r-- | db/models/payments.js | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/db/index.js b/db/index.js index 57586954..c4dab977 100644 --- a/db/index.js +++ b/db/index.js @@ -162,4 +162,9 @@ Referral.belongsTo(User, { foreignKey: "user_id", }); +Payment.belongsTo(Payment, { + as: "fee_payment", + foreignKey: "fee_payment_id" +}); + db.Order = Order; diff --git a/db/models/payments.js b/db/models/payments.js index c315a5a0..bbf7c436 100644 --- a/db/models/payments.js +++ b/db/models/payments.js @@ -189,6 +189,15 @@ const attributes = { autoIncrement: false, comment: null, field: "confirmed" + }, + fee_payment_id: { + type: DataTypes.INTEGER(11), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "fee_payment_id" } }; |
