Files
telegram_new_socias/modules/onboarding.py
google-labs-jules[bot] 113da3d5a5 feat: Implement DB-based user registration check and schema docs
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.
2025-12-16 19:01:40 +00:00

19 KiB