mirror of
https://github.com/langgenius/dify.git
synced 2026-04-15 18:06:36 +08:00
refactor: migrate TrialApp and AccountTrialAppRecord to TypeBase (#34897)
This commit is contained in:
parent
5fafac0ca4
commit
660c7e4a43
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user