operation

This commit is contained in:
2025-11-06 07:17:31 +01:00
parent e2753d0ea3
commit 7e228d15b7

View File

@@ -89,8 +89,8 @@ erDiagram
%% Relations %% Relations
person ||--|| holder person ||--|| holder :
company ||--|| holder company ||--|| holder :
``` ```
## 2. Les comptes ## 2. Les comptes
@@ -149,13 +149,14 @@ erDiagram
account { account {
bigint id PK bigint id PK
date creation_date date creation_date
decimal balance >0 decimal balance
text currency_code FK text currency_code FK
} }
account_holder { account_holder {
bigint account_id FK bigint account_id FK
bigint holder_id FK bigint holder_id FK
decimal share
} }
transaction { transaction {
@@ -184,6 +185,15 @@ erDiagram
decimal amount decimal amount
} }
operation {
bigint id PK
bigint transaction_id
text source_account
text target_account
decimal amount
text direction
}
%% Relations %% Relations
person ||--|| holder : person ||--|| holder :
@@ -193,6 +203,9 @@ erDiagram
account_holder }|--|{ account : account_holder }|--|{ account :
currency ||--|{ account : currency ||--|{ account :
exchange_rate }o--|| currency : exchange_rate }o--|| currency :
transaction }o--|| operation :
operation }o--|| account :
operation }o--|| account :
``` ```
## 4. Procédure stockée ## 4. Procédure stockée