diff options
| author | Adam Soltys <[email protected]> | 2020-04-24 22:46:45 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-04-24 22:46:45 -0700 |
| commit | 83f973224bad381df62774bcc058f76eab635f0c (patch) | |
| tree | ef231f4490b0c9d194b8683be50c05524738903e /db/index.js | |
| parent | 306357c24d3014b55ae1cd25b954a695ea2e5cc6 (diff) | |
| download | coinos-server-assets.tar.gz coinos-server-assets.zip | |
wipassets
Diffstat (limited to 'db/index.js')
| -rw-r--r-- | db/index.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/db/index.js b/db/index.js index bb94fb98..215d34df 100644 --- a/db/index.js +++ b/db/index.js @@ -28,6 +28,11 @@ db["User"].hasMany(db["Payment"], { foreignKey: "user_id" }); +db["User"].belongsTo(db["Account"], { + as: "account", + foreignKey: "account_id" +}); + db["Account"].belongsTo(db["User"], { as: "user", foreignKey: "user_id" @@ -38,6 +43,11 @@ db["Invoice"].belongsTo(db["User"], { foreignKey: "user_id" }); +db["Payment"].belongsTo(db["Account"], { + as: "account", + foreignKey: "account_id" +}); + db["Payment"].belongsTo(db["User"], { as: "user", foreignKey: "user_id" |
