feat: add common model

This commit is contained in:
2023-08-25 02:26:19 +08:00
parent a58f97f61b
commit fe393ff95c
3 changed files with 37 additions and 7 deletions

View File

@ -0,0 +1,18 @@
from sqlalchemy import TEXT
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
__all__ = [
"CommonBase",
"Property",
]
class CommonBase(DeclarativeBase):
pass
class Property(CommonBase):
__tablename__ = "property"
id: Mapped[str] = mapped_column(TEXT(), primary_key=True)
value: Mapped[str] = mapped_column(TEXT())