mirror of
https://github.com/marcogll/telegram_new_socias.git
synced 2026-01-13 13:15:16 +00:00
feat: refactor schedule storage to vanity_hr schema, update onboarding command to /registro, and enhance horario flow with short name collection
This commit is contained in:
@@ -106,6 +106,16 @@ CREATE TABLE IF NOT EXISTS permisos (
|
||||
FOREIGN KEY (numero_empleado) REFERENCES data_empleadas(numero_empleado)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS horario_empleadas (
|
||||
id_horario INT AUTO_INCREMENT PRIMARY KEY,
|
||||
numero_empleado VARCHAR(15),
|
||||
telegram_id BIGINT,
|
||||
dia_semana VARCHAR(20),
|
||||
hora_entrada_teorica TIME,
|
||||
hora_salida_teorica TIME,
|
||||
FOREIGN KEY (numero_empleado) REFERENCES data_empleadas(numero_empleado)
|
||||
);
|
||||
|
||||
USE vanity_attendance;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS asistencia_registros (
|
||||
@@ -120,32 +130,3 @@ CREATE TABLE IF NOT EXISTS asistencia_registros (
|
||||
telegram_id_usado BIGINT,
|
||||
FOREIGN KEY (numero_empleado) REFERENCES vanity_hr.data_empleadas(numero_empleado)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS horario_empleadas (
|
||||
id_horario INT AUTO_INCREMENT PRIMARY KEY,
|
||||
numero_empleado VARCHAR(15),
|
||||
telegram_id BIGINT,
|
||||
dia_semana VARCHAR(20),
|
||||
hora_entrada_teorica TIME,
|
||||
hora_salida_teorica TIME,
|
||||
FOREIGN KEY (numero_empleado) REFERENCES vanity_hr.data_empleadas(numero_empleado)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS horarios_configurados (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
telegram_id BIGINT NOT NULL,
|
||||
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
short_name VARCHAR(100),
|
||||
monday_in TIME,
|
||||
monday_out TIME,
|
||||
tuesday_in TIME,
|
||||
tuesday_out TIME,
|
||||
wednesday_in TIME,
|
||||
wednesday_out TIME,
|
||||
thursday_in TIME,
|
||||
thursday_out TIME,
|
||||
friday_in TIME,
|
||||
friday_out TIME,
|
||||
saturday_in TIME,
|
||||
saturday_out TIME
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user