aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-03-27 23:17:38 -0700
committerAdam Soltys <[email protected]>2020-03-27 23:17:38 -0700
commit5142c8cfcffd59d04ec18e67183a1866324d9209 (patch)
tree265b9bc31176ac88b15bbe7aa54d19a910e56c13 /db
parenta4c3ecab30a279db7ed7f7289448c01c73c7b523 (diff)
downloadcoinos-server-5142c8cfcffd59d04ec18e67183a1866324d9209.tar.gz
coinos-server-5142c8cfcffd59d04ec18e67183a1866324d9209.zip
create lightning payment
Diffstat (limited to 'db')
-rw-r--r--db/index.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/db/index.js b/db/index.js
index 9e78da9d..b411a8ef 100644
--- a/db/index.js
+++ b/db/index.js
@@ -17,7 +17,17 @@ db["User"].hasMany(db["Payment"], {
foreignKey: "user_id"
});
+db["User"].hasMany(db["Invoice"], {
+ as: "invoices",
+ foreignKey: "user_id"
+});
+
db["Payment"].belongsTo(db["User"], {
as: "user",
foreignKey: "user_id"
});
+
+db["Invoice"].belongsTo(db["User"], {
+ as: "user",
+ foreignKey: "user_id"
+});