refactor!: sqlalchemy database models

This commit is contained in:
2024-04-02 22:15:21 +08:00
parent 2204338a5e
commit b78040a795
7 changed files with 5 additions and 4 deletions

View File

@ -0,0 +1,22 @@
# pylint: disable=too-few-public-methods
from sqlalchemy import TEXT
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
from .common import ReprHelper
__all__ = [
"ConfigBase",
"Property",
]
class ConfigBase(DeclarativeBase, ReprHelper):
pass
class Property(ConfigBase):
__tablename__ = "properties"
key: Mapped[str] = mapped_column(TEXT(), primary_key=True)
value: Mapped[str] = mapped_column(TEXT())