# -*- coding: utf-8 -*- import logging from website.db import get_session from sqlalchemy import text class EnterpriseEntityDB(object): def __init__(self): pass def select_entity_suid(self, entity_id: int) -> str: with get_session() as session: res = session.execute(text("select suid from enterprise where id=:id"), {"id": entity_id}) return res.fetchone()["suid"]