mirror of
https://github.com/marcogll/telegram_new_socias.git
synced 2026-01-13 13:15:16 +00:00
This commit introduces a comprehensive database schema and implements a new user registration validation system.
1. **New Database Documentation (`db_tasks.md`):**
* Creates a new `db_tasks.md` file to document the full database schema.
* Defines detailed tables for `users` (with vacation balance tracking), `vacations`, and `permission_requests` to serve as a robust HR management system.
2. **User Registration Validation:**
* Removes the previous user validation logic that relied on Google Sheets.
* Adds a new `FullHRData` SQLAlchemy model that maps to the `vanessa_logs.full_HRdata` table.
* Implements a `check_user_registration` function in `modules/database.py` to verify if a user's `telegram_chat_id` already exists in the database.
* Integrates this check into the `/welcome` command in `modules/onboarding.py`. The bot now blocks already-registered users with a specific error message, as requested.
19 KiB
19 KiB