WeChatMsg/app/DataBase/__init__.py

41 lines
850 B
Python
Raw Normal View History

2023-01-11 13:04:19 +08:00
# -*- coding: utf-8 -*-
"""
@File : __init__.py.py
@Author : Shuaikang Zhou
@Time : 2023/1/5 0:10
@IDE : Pycharm
@Version : Python3.10
@comment : ···
"""
from .hard_link import HardLink
from .micro_msg import MicroMsg
from .media_msg import MediaMsg
from .misc import Misc
from .msg import Msg
2023-12-03 21:25:50 +08:00
from .msg import MsgType
misc_db = Misc()
msg_db = Msg()
micro_msg_db = MicroMsg()
hard_link_db = HardLink()
media_msg_db = MediaMsg()
def close_db():
misc_db.close()
msg_db.close()
micro_msg_db.close()
hard_link_db.close()
media_msg_db.close()
2023-12-17 13:15:49 +08:00
def init_db():
misc_db.init_database()
msg_db.init_database()
micro_msg_db.init_database()
hard_link_db.init_database()
media_msg_db.init_database()
__all__ = ['output', 'misc_db', 'micro_msg_db', 'msg_db', 'hard_link_db', 'MsgType', "media_msg_db"]