diff options
| author | Adam Soltys <[email protected]> | 2022-11-12 03:32:19 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-12 03:32:19 -0800 |
| commit | 9529f831977568a398c39a9ea8cb65b97dae7eec (patch) | |
| tree | 44f1e043fc51753cfd20e0594c23edf538533fdf /db | |
| parent | 346ed3e679ee39112a4041079ffdd68656c1514a (diff) | |
| download | coinos-server-9529f831977568a398c39a9ea8cb65b97dae7eec.tar.gz coinos-server-9529f831977568a398c39a9ea8cb65b97dae7eec.zip | |
request invoice relationship
Diffstat (limited to 'db')
| -rw-r--r-- | db/index.js | 6 |
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; |
