🗃️ 添加 TETRIOUserConfig

This commit is contained in:
2024-06-09 04:24:48 +08:00
parent f44c0baa2e
commit 38ab872dd8
2 changed files with 49 additions and 0 deletions

View File

@@ -15,3 +15,8 @@ class TETRIOHistoricalData(MappedAsDataclass, Model):
api_type: Mapped[Literal['User Info', 'User Records']] = mapped_column(String(16), index=True)
data: Mapped[SuccessModel] = mapped_column(PydanticType(get_model=[SuccessModel.__subclasses__], models=set()))
update_time: Mapped[datetime] = mapped_column(DateTime, index=True)
class TETRIOUserConfig(MappedAsDataclass, Model):
id: Mapped[int] = mapped_column(init=False, primary_key=True)
query_template: Mapped[Literal['v1', 'v2']] = mapped_column(String(2))