diff options
| author | Adrien Hopkins <[email protected]> | 2022-05-31 14:14:06 -0500 |
|---|---|---|
| committer | Adrien Hopkins <[email protected]> | 2022-05-31 14:14:06 -0500 |
| commit | 1db7a0b0a2e897b67617a67fc852f538baecce76 (patch) | |
| tree | 81bc5ac2ad588449869b79f8956b89927eb21d27 /db | |
| parent | 72e945305349cf18d45e74e9537e9adbd655c68c (diff) | |
| download | coinos-server-1db7a0b0a2e897b67617a67fc852f538baecce76.tar.gz coinos-server-1db7a0b0a2e897b67617a67fc852f538baecce76.zip | |
Add fee payment to database
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..5a10a01a 100644 --- a/db/index.js +++ b/db/index.js @@ -162,4 +162,9 @@ Referral.belongsTo(User, { foreignKey: "user_id", }); +Payment.belongsTo(Payment, { + as: "fee", + 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" } }; |
