37 lines
609 B
Plaintext
37 lines
609 B
Plaintext
@startuml
|
|
|
|
hide circle
|
|
skinparam linetype ortho
|
|
|
|
entity users_telegram {
|
|
id : int <<PK>>
|
|
first_name : longtext
|
|
last_name : longtext null
|
|
username : longtext null
|
|
phone_number : longtext null
|
|
last_update : datetime
|
|
--
|
|
}
|
|
|
|
entity users {
|
|
id : binary(40) <<PK>>
|
|
telegram : int <<FK>>
|
|
--
|
|
* telegram = users_telegram.id
|
|
on update cascade
|
|
on delete cascade
|
|
}
|
|
users ||-o| users_telegram
|
|
|
|
entity credit_wallet {
|
|
id : binary(40) <<PK>>
|
|
owner : binary(40) <<FK>>
|
|
balance : int
|
|
--
|
|
* owner = users.id
|
|
on update cascade
|
|
on delete cascade
|
|
}
|
|
users ||--|| credit_wallet
|
|
|
|
@enduml |