diff --git a/plan/milestone/credit.puml b/plan/milestone/credit.puml new file mode 100644 index 0000000..879ca9c --- /dev/null +++ b/plan/milestone/credit.puml @@ -0,0 +1,37 @@ +@startuml + +hide circle +skinparam linetype ortho + +entity users_telegram { + id : int <> + first_name : longtext + last_name : longtext null + username : longtext null + phone_number : longtext null + last_update : datetime + -- +} + +entity users { + id : binary(40) <> + telegram : int <> + -- + * telegram = users_telegram.id + on update cascade + on delete cascade +} +users ||-o| users_telegram + +entity credit_wallet { + id : binary(40) <> + owner : binary(40) <> + balance : int + -- + * owner = users.id + on update cascade + on delete cascade +} +users ||--|| credit_wallet + +@enduml \ No newline at end of file