Se ha implementado un nuevo flujo de conversación para que los usuarios puedan definir su horario de trabajo a través del comando .
Cambios:
1. **Nuevo **: Se ha añadido un nuevo archivo JSON que define las preguntas y los estados de la conversación para la definición de horarios.
2. **Actualización de **: Se ha añadido el comando a la lista de comandos del bot para que sea visible en el menú de Telegram.
El existente carga dinámicamente este nuevo flujo, haciéndolo disponible para los usuarios sin necesidad de cambios adicionales en la lógica principal del bot.
This commit refactors the bot's architecture to dynamically load and build conversation flows from JSON files instead of hardcoding them in Python.
- Added to read flow definitions from the directory and dynamically build s.
- Refactored to use the new flow builder and load all conversation handlers at startup.
- Moved hardcoded links to environment variables for better configuration.
- Updated to support conditional branching for 'Other' options, using a field to define state transitions.
- Updated with the new link variables.
This commit introduces a three-database architecture to the application,
as specified in the `db_logic.md` file.
The changes include:
- A SQL initialization script (`db/init/init.sql`) to create the
`USERS_ALMA`, `vanity_hr`, and `vanity_attendance` databases and their
respective tables.
- SQLAlchemy models for all tables, organized into separate files
within the `models` directory.
- Refactoring of the database connection logic in `modules/database.py`
to support connections to all three databases.
- Creation of a `modules/logger.py` to handle request logging to the
`USERS_ALMA` database.
- Updates to `docker-compose.yml` to mount the initialization script and
build the bot image locally.
- Updates to `.env.example` to include the new database environment
variables.
- Restoration of the data dictionary to `db_tasks.md`.
This commit introduces Docker and Docker Compose to containerize the application and orchestrate it with a MySQL database.
Key changes include:
- Added a `Dockerfile` to create a container for the Python bot.
- Created a `docker-compose.yml` file to manage the bot and MySQL services.
- Added a `modules/database.py` module to handle database connections and logging with SQLAlchemy.
- Integrated request logging into all command handlers.
- Updated `requirements.txt` with necessary dependencies for MySQL.
- Updated `.env` and `.gitignore` to manage database credentials securely.
- Updated `Readme.md` with instructions on how to run the application using Docker Compose.