matrix-puppeteer-line/matrix_puppeteer_line/db/__init__.py

17 lines
401 B
Python
Raw Normal View History

2020-08-28 09:38:06 -04:00
from mautrix.util.async_db import Database
from .upgrade import upgrade_table
from .user import User
from .puppet import Puppet
from .portal import Portal
from .message import Message
2021-04-06 01:54:21 -04:00
from .media import Media
2020-08-28 09:38:06 -04:00
def init(db: Database) -> None:
2021-04-06 01:54:21 -04:00
for table in (User, Puppet, Portal, Message, Media):
2020-08-28 09:38:06 -04:00
table.db = db
2021-04-06 01:54:21 -04:00
__all__ = ["upgrade_table", "User", "Puppet", "Portal", "Message", "Media"]