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:
Marco Gallegos
2025-12-20 22:43:34 -06:00
parent 338108d7b7
commit d66e8118eb
16 changed files with 570 additions and 405 deletions

View File

@@ -18,36 +18,3 @@ class AsistenciaRegistros(Base):
sucursal_registro = Column(String(50))
telegram_id_usado = Column(BigInteger)
empleada = relationship("DataEmpleadas", backref="asistencia_registros")
class HorarioEmpleadas(Base):
__tablename__ = 'horario_empleadas'
__table_args__ = {'schema': 'vanity_attendance'}
id_horario = Column(Integer, primary_key=True, autoincrement=True)
numero_empleado = Column(String(15), ForeignKey('vanity_hr.data_empleadas.numero_empleado'))
telegram_id = Column(BigInteger)
dia_semana = Column(String(20))
hora_entrada_teorica = Column(Time)
hora_salida_teorica = Column(Time)
empleada = relationship("DataEmpleadas", backref="horario_empleadas")
class HorariosConfigurados(Base):
__tablename__ = 'horarios_configurados'
__table_args__ = {'schema': 'vanity_attendance'}
id = Column(Integer, primary_key=True, autoincrement=True)
telegram_id = Column(BigInteger, nullable=False)
timestamp = Column(Time)
short_name = Column(String(100))
monday_in = Column(Time)
monday_out = Column(Time)
tuesday_in = Column(Time)
tuesday_out = Column(Time)
wednesday_in = Column(Time)
wednesday_out = Column(Time)
thursday_in = Column(Time)
thursday_out = Column(Time)
friday_in = Column(Time)
friday_out = Column(Time)
saturday_in = Column(Time)
saturday_out = Column(Time)