aboutsummaryrefslogtreecommitdiffstats
path: root/db/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'db/index.js')
-rw-r--r--db/index.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/db/index.js b/db/index.js
index 7f011c9c..6fa225e6 100644
--- a/db/index.js
+++ b/db/index.js
@@ -41,6 +41,11 @@ db["User"].belongsTo(db["Account"], {
foreignKey: "account_id"
});
+db["Invoice"].belongsTo(db["Account"], {
+ as: "account",
+ foreignKey: "account_id"
+});
+
db["Account"].belongsTo(db["User"], {
as: "user",
foreignKey: "user_id"