diff options
| author | Andrew Guschin <guschin.drew@gmail.com> | 2022-06-29 17:45:07 +0400 |
|---|---|---|
| committer | Andrew Guschin <guschin.drew@gmail.com> | 2022-06-29 17:45:07 +0400 |
| commit | fc8fa5a30bf464557051ac22a75ca83de3a29f7b (patch) | |
| tree | 39af088ddf259deb080f2f21f31d89c2206e6ab2 /spec.org | |
Diffstat (limited to 'spec.org')
| -rw-r--r-- | spec.org | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/spec.org b/spec.org new file mode 100644 index 0000000..eea2014 --- /dev/null +++ b/spec.org @@ -0,0 +1,49 @@ +#+TITLE: Bot architecture + +* База данных + +** Таблицы + +*** users +| field | type | foreign | +|-----------+----------+---------| +| id | int PK | no | +| tg_id | int | no | +| tg_handle | varchar | no | +| joined_at | datetime | no | + +*** clients +| field | type | foreign | +|------------+----------+----------| +| id | int PK | no | +| user_id | int | users.id | +| ip | int | no | +| pubkey | varchar | no | +| created_at | datetime | no | + +*** user_perms +| field | type | foreign | +|-----------+--------+----------| +| user_id | int PK | users.id | +| is_admin | bool | no | +| is_client | bool | no | + + +** Представления + +*** ClientsView +| field | type | foreign | +|--------+---------+---------| +| ip | int | no | +| pubkey | varchar | no | +WHERE: user.is_client = True + +* Бот + +** MAIN_MENU +- Создать новый клиент -> CREATE +- Список созданных клиентов + +** NAME_CLIENT +- [Ввод] Название клиента +- Назад -> MAIN_MENU |