aboutsummaryrefslogtreecommitdiffstats
path: root/db/index.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-11-12 03:32:19 -0800
committerAdam Soltys <[email protected]>2022-11-12 03:32:19 -0800
commit9529f831977568a398c39a9ea8cb65b97dae7eec (patch)
tree44f1e043fc51753cfd20e0594c23edf538533fdf /db/index.js
parent346ed3e679ee39112a4041079ffdd68656c1514a (diff)
downloadcoinos-server-9529f831977568a398c39a9ea8cb65b97dae7eec.tar.gz
coinos-server-9529f831977568a398c39a9ea8cb65b97dae7eec.zip
request invoice relationship
Diffstat (limited to 'db/index.js')
-rw-r--r--db/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/db/index.js b/db/index.js
index 255382f4..0437ece6 100644
--- a/db/index.js
+++ b/db/index.js
@@ -147,6 +147,12 @@ Request.belongsTo(Invoice, {
foreignKey: "invoice_id"
});
+Invoice.hasOne(Request, {
+ as: "request",
+ foreignKey: "invoice_id"
+});
+
+
db.Order = Order;
export default db;