formaptix-server/database/__init__.py
2024-08-15 18:01:01 +00:00

15 lines
348 B
Python

from models import settings
from sqlalchemy.ext.asyncio import create_async_engine, async_sessionmaker
from sqlalchemy.orm import DeclarativeBase
engine = create_async_engine(settings.database)
sessions = async_sessionmaker(engine)
class Base(DeclarativeBase):
pass
from .user import User
from .form import Form
from .answer import Answer