diff options
| author | Adam Soltys <[email protected]> | 2022-11-03 01:28:48 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-03 01:28:48 -0700 |
| commit | 4f5a5014cc097dc8a30f691bd49bf5055708a5e9 (patch) | |
| tree | 7d2bf5a509da2cc5465b53a4147e7754ffd65de1 /db | |
| parent | bba0fc2708130962cd4d9373acc3ab68c9334c7e (diff) | |
| parent | da2a1713b13b31310843136eeaabe524c4eee42c (diff) | |
| download | coinos-server-4f5a5014cc097dc8a30f691bd49bf5055708a5e9.tar.gz coinos-server-4f5a5014cc097dc8a30f691bd49bf5055708a5e9.zip | |
Merge branch 'master' into prod
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 8c94a4d3..81c0fe46 100644 --- a/db/index.js +++ b/db/index.js @@ -124,6 +124,11 @@ Payment.belongsTo(Payment, { foreignKey: "fee_payment_id" }); +Payment.belongsTo(User, { + as: "with", + foreignKey: "with_id" +}); + db.Order = Order; export default db; diff --git a/db/models/payments.js b/db/models/payments.js index b3ac0b74..fac8ff56 100644 --- a/db/models/payments.js +++ b/db/models/payments.js @@ -11,6 +11,15 @@ const attributes = { comment: null, field: "id" }, + with_id: { + type: DataTypes.INTEGER(11), + allowNull: true, + defaultValue: null, + primaryKey: false, + autoIncrement: false, + comment: null, + field: "with_id" + }, account_id: { type: DataTypes.INTEGER(11), allowNull: true, |
