from peewee import SqliteDatabase, Model
from core.logger import LogLevel, PrintLog

# 连接到SQLite数据库
db: SqliteDatabase = SqliteDatabase('example.db')
db.connect()
PrintLog(LogLevel.INFO, '- [成功]数据库连接')

# 定义基础模型类
class BaseModel(Model):
    class Meta:
        database: SqliteDatabase = db