from Consultas_SQL.conexion import get_connection

class Louvers_in_Out_Service:

    @staticmethod
    def get_louvers_in_description(louvers_in_id:str):
        try:
            with get_connection() as conn:
                with conn.cursor() as cursor:
                    query = """
                            select
                            louvers_in_description
                            from louvers_in
                            where louvers_in_id = ?
                            """
                    cursor.execute(query, (louvers_in_id))
                    tipos = cursor.fetchall()
                    return tipos
                
        except Exception as e:
            print(f"Error actualizando Louvers_in_Out_Service 001: {e}")
            return False


    @staticmethod
    def get_louvers_out_description(louvers_out_id:str):
        try:
            with get_connection() as conn:
                with conn.cursor() as cursor:
                    query = """
                            select
                            louvers_out_description
                            from louvers_out
                            where louvers_out_id = ?
                            """
                    cursor.execute(query, (louvers_out_id))
                    tipos = cursor.fetchall()
                    return tipos
                
        except Exception as e:
            print(f"Error actualizando Louvers_in_Out_Service 002: {e}")
            return False