refactor: migrate TrialApp and AccountTrialAppRecord to TypeBase (#34897)

This commit is contained in:
sxxtony
2026-04-10 05:13:06 +00:00
committed by GitHub
parent 5fafac0ca4
commit 660c7e4a43
+2 -10
View File
@@ -913,11 +913,7 @@ class TrialApp(TypeBase):
app_id: Mapped[str] = mapped_column(StringUUID, nullable=False)
tenant_id: Mapped[str] = mapped_column(StringUUID, nullable=False)
created_at: Mapped[datetime] = mapped_column(
sa.DateTime,
nullable=False,
insert_default=func.current_timestamp(),
server_default=func.current_timestamp(),
init=False,
sa.DateTime, nullable=False, server_default=func.current_timestamp(), init=False
)
trial_limit: Mapped[int] = mapped_column(sa.Integer, nullable=False, default=3)
@@ -941,11 +937,7 @@ class AccountTrialAppRecord(TypeBase):
app_id: Mapped[str] = mapped_column(StringUUID, nullable=False)
count: Mapped[int] = mapped_column(sa.Integer, nullable=False, default=0)
created_at: Mapped[datetime] = mapped_column(
sa.DateTime,
nullable=False,
insert_default=func.current_timestamp(),
server_default=func.current_timestamp(),
init=False,
sa.DateTime, nullable=False, server_default=func.current_timestamp(), init=False
)
@property