# Path: onefl/models/base.py
# def get_session():
#     global session
#     if session is None:
#         session = DBSession()
#     return session


from onefl.models.base import get_session
"""
Goal: simplify the code when interacting with entities
"""


class CRUDMixin():
    """ Helper class sqlalchemy entities """
    __table_args__ = {'extend_existing': True}

    # id = db.Column(db.Integer, primary_key=True)

    @classmethod
    def get_by_id(cls, id):
        if any(
            (isinstance(id, str) and id.isdigit(),
             isinstance(id, (int, float))),):

# Path: onefl/models/base.py
# def get_session():
#     global session
#     if session is None:
#         session = DBSession()
#     return session


# Path: onefl/models/crud_mixin.py
from onefl.models.base import get_session

"""
Goal: simplify the code when interacting with entities
"""


class CRUDMixin():
    """ Helper class sqlalchemy entities """
    __table_args__ = {'extend_existing': True}

    # id = db.Column(db.Integer, primary_key=True)

    @classmethod
    def get_by_id(cls, id):
        if any(
            (isinstance(id, str) and id.isdigit(),
             isinstance(id, (int, float))),):

            session = get_session()