aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/index.js5
-rw-r--r--db/models/payments.js9
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"
}
};