-
Notifications
You must be signed in to change notification settings - Fork 0
/
DatabaseDiagram
165 lines (163 loc) · 4.53 KB
/
DatabaseDiagram
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
@startuml
!theme plain
top to bottom direction
skinparam linetype ortho
class accounts {
name: varchar(255)
type: varchar(255)
mapping: varchar(255)
created_by: int
updated_by: int
organization_id: int
id: int unsigned
}
class chains {
chain: varchar(255)
currency: varchar(255)
name: varchar(255)
queue: varchar(255)
digital_assets_service_id: varchar(255)
logo: varchar(255)
created_at: timestamp
updated_at: timestamp
created_by: varchar(255)
updated_by: varchar(255)
id: int unsigned
}
class connections {
organization_id: int
portfolio_id: int
name: varchar(255)
address: varchar(255)
network: varchar(255)
address_type: enum('address', 'wallet', 'exchange')
from_file: tinyint(1)
wallet_id: int
exchange_id: int
api_key: varchar(255)
api_secret: varchar(255)
created_at: timestamp
updated_at: timestamp
created_by: int
updated_by: int
status: varchar(255)
total_transactions: int
total_token_transfers: int
imported_transactions: int
imported_token_transfers: int
import_transactions_attemps: int
import_token_transfers_attempts: int
imported_transactions_cursor: text
imported_token_transfers_cursor: text
imported_prices: int
imported_prices_attemps: int
profit_calculation_method: varchar(255)
id: int unsigned
}
class contacts {
address: varchar(255)
name: varchar(255)
email: varchar(255)
description: varchar(255)
created_by: int
updated_by: int
organization_id: int
id: int unsigned
}
class digital_assets {
digital_assets_id: varchar(255)
chain: varchar(255)
contract: varchar(255)
digital_asset_type: varchar(255)
name: varchar(255)
status: varchar(255)
symbol: varchar(255)
created_at: timestamp
updated_at: timestamp
created_by: varchar(255)
updated_by: varchar(255)
id: int unsigned
}
class digital_assets_services {
digital_assets_id: varchar(255)
service: varchar(255)
service_id: varchar(255)
id: int unsigned
}
class exchanges {
name: varchar(255)
created_at: timestamp
updated_at: timestamp
created_by: varchar(255)
updated_by: varchar(255)
subgraph: varchar(255)
chain: varchar(255)
id: int unsigned
}
class organizations {
name: varchar(255)
created_at: timestamp
updated_at: timestamp
created_by: varchar(255)
updated_by: varchar(255)
id: int unsigned
}
class portfolios {
name: varchar(255)
currency: varchar(255)
timezone: varchar(255)
valuation_method: enum('fifo', 'lifo', 'hifo', 'aw')
country: varchar(2)
organization_id: int
created_at: timestamp
updated_at: timestamp
created_by: varchar(255)
updated_by: varchar(255)
id: int unsigned
}
class reports {
type: varchar(255)
format: varchar(255)
assets: varchar(255)
report: varchar(255)
created_by: int
updated_by: int
portfolio_id: int
organization_id: int
created_at: timestamp
updated_at: timestamp
id: int unsigned
}
class users {
organization_id: int
username: varchar(255)
password: varchar(255)
onboarded: tinyint(1)
created_at: timestamp
updated_at: timestamp
created_by: varchar(255)
updated_by: varchar(255)
id: int unsigned
}
class wallets {
name: varchar(255)
created_at: timestamp
updated_at: timestamp
created_by: varchar(255)
updated_by: varchar(255)
id: int unsigned
}
accounts -[#595959,plain]-^ organizations : "organization_id:id"
chains -[#595959,plain]-^ digital_assets_services : "digital_assets_service_id:id"
connections -[#595959,plain]-^ exchanges : "exchange_id:id"
connections -[#595959,plain]-^ organizations : "organization_id:id"
connections -[#595959,plain]-^ portfolios : "portfolio_id:id"
connections -[#595959,plain]-^ wallets : "wallet_id:id"
contacts -[#595959,plain]-^ organizations : "organization_id:id"
digital_assets -[#595959,plain]-^ digital_assets : "digital_assets_id:id"
digital_assets_services -[#595959,plain]-^ digital_assets : "digital_assets_id:id"
portfolios -[#595959,plain]-^ organizations : "organization_id:id"
reports -[#595959,plain]-^ organizations : "organization_id:id"
reports -[#595959,plain]-^ portfolios : "portfolio_id:id"
users -[#595959,plain]-^ organizations : "organization_id:id"
@enduml