mirror of
https://github.com/getAlby/lndhub.go.git
synced 2025-12-30 02:55:28 +01:00
Update README.md
This commit is contained in:
52
README.md
52
README.md
@@ -61,31 +61,31 @@ LndHub.go supports PostgreSQL and SQLite as database backend. But SQLite does no
|
||||
### Data model
|
||||
|
||||
```
|
||||
┌─────────────┐
|
||||
│ User │
|
||||
└─────────────┘
|
||||
│
|
||||
┌─────────────────┬───────┴─────────┬─────────────────┐
|
||||
▼ ▼ ▼ ▼
|
||||
Accounts: ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
||||
│ Incoming │ │ Current │ │ Outgoing │ │ Fees │
|
||||
Every user has └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
|
||||
four accounts
|
||||
|
||||
Every Transaction Entry is associated to one debit account and one
|
||||
credit account
|
||||
|
||||
┌────────────────────────┐
|
||||
│Transaction Entry │
|
||||
│ │
|
||||
│+ user_id │
|
||||
┌────────────┐ │+ invoice_id │
|
||||
│ Invoice │────────────────▶+ debit_account_id │
|
||||
└────────────┘ │+ credit_account_id │
|
||||
│+ amount │
|
||||
Invoice holds the │+ ... │
|
||||
lightning related │ │
|
||||
data └────────────────────────┘
|
||||
|
||||
┌─────────────┐
|
||||
│ User │
|
||||
└─────────────┘
|
||||
│
|
||||
┌─────────────────┬───────┴─────────┬─────────────────┐
|
||||
▼ ▼ ▼ ▼
|
||||
Accounts: ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
||||
│ Incoming │ │ Current │ │ Outgoing │ │ Fees │
|
||||
Every user has └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
|
||||
four accounts
|
||||
|
||||
Every Transaction Entry is associated to one debit account and one
|
||||
credit account
|
||||
|
||||
┌────────────────────────┐
|
||||
│Transaction Entry │
|
||||
│ │
|
||||
│+ user_id │
|
||||
┌────────────┐ │+ invoice_id │
|
||||
│ Invoice │────────────────▶+ debit_account_id │
|
||||
└────────────┘ │+ credit_account_id │
|
||||
│+ amount │
|
||||
Invoice holds the │+ ... │
|
||||
lightning related │ │
|
||||
data └────────────────────────┘
|
||||
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user