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

@ -3,18 +3,22 @@ from typing import Optional
from sqlalchemy import TEXT, ForeignKey
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
__all__ = [
"SongsBase",
"Pack",
"PackLocalized",
"Song",
"SongLocalized",
"Chart",
"ChartLocalized",
"ChartInfo",
]
class SongsBase(DeclarativeBase):
pass
class Property(SongsBase):
__tablename__ = "property"
id: Mapped[str] = mapped_column(TEXT(), primary_key=True)
value: Mapped[str] = mapped_column(TEXT())
class Pack(SongsBase):
__tablename__ = "pack"