|
|
|
|
@ -85,18 +85,20 @@ class Account(UserMixin, Base):
|
|
|
|
|
__table_args__ = (db.PrimaryKeyConstraint("id", name="account_pkey"), db.Index("account_email_idx", "email"))
|
|
|
|
|
|
|
|
|
|
id: Mapped[str] = mapped_column(StringUUID, server_default=db.text("uuid_generate_v4()"))
|
|
|
|
|
name = mapped_column(db.String(255), nullable=False)
|
|
|
|
|
email = mapped_column(db.String(255), nullable=False)
|
|
|
|
|
password = mapped_column(db.String(255), nullable=True)
|
|
|
|
|
password_salt = mapped_column(db.String(255), nullable=True)
|
|
|
|
|
avatar = mapped_column(db.String(255))
|
|
|
|
|
interface_language = mapped_column(db.String(255))
|
|
|
|
|
interface_theme = mapped_column(db.String(255))
|
|
|
|
|
timezone = mapped_column(db.String(255))
|
|
|
|
|
name: Mapped[str] = mapped_column(db.String(255))
|
|
|
|
|
email: Mapped[str] = mapped_column(db.String(255))
|
|
|
|
|
password: Mapped[Optional[str]] = mapped_column(db.String(255))
|
|
|
|
|
password_salt: Mapped[Optional[str]] = mapped_column(db.String(255))
|
|
|
|
|
avatar: Mapped[str] = mapped_column(db.String(255))
|
|
|
|
|
interface_language: Mapped[str] = mapped_column(db.String(255))
|
|
|
|
|
interface_theme: Mapped[str] = mapped_column(db.String(255))
|
|
|
|
|
timezone: Mapped[str] = mapped_column(db.String(255))
|
|
|
|
|
last_login_at = mapped_column(db.DateTime)
|
|
|
|
|
last_login_ip = mapped_column(db.String(255))
|
|
|
|
|
last_login_ip: Mapped[str] = mapped_column(db.String(255))
|
|
|
|
|
last_active_at = mapped_column(db.DateTime, nullable=False, server_default=func.current_timestamp())
|
|
|
|
|
status = mapped_column(db.String(16), nullable=False, server_default=db.text("'active'::character varying"))
|
|
|
|
|
status: Mapped[str] = mapped_column(
|
|
|
|
|
db.String(16), nullable=False, server_default=db.text("'active'::character varying")
|
|
|
|
|
)
|
|
|
|
|
initialized_at = mapped_column(db.DateTime)
|
|
|
|
|
created_at = mapped_column(db.DateTime, nullable=False, server_default=func.current_timestamp())
|
|
|
|
|
updated_at = mapped_column(db.DateTime, nullable=False, server_default=func.current_timestamp())
|
|
|
|
|
@ -197,10 +199,10 @@ class Tenant(Base):
|
|
|
|
|
__table_args__ = (db.PrimaryKeyConstraint("id", name="tenant_pkey"),)
|
|
|
|
|
|
|
|
|
|
id: Mapped[str] = mapped_column(StringUUID, server_default=db.text("uuid_generate_v4()"))
|
|
|
|
|
name = mapped_column(db.String(255), nullable=False)
|
|
|
|
|
name: Mapped[str] = mapped_column(db.String(255))
|
|
|
|
|
encrypt_public_key = mapped_column(db.Text)
|
|
|
|
|
plan = mapped_column(db.String(255), nullable=False, server_default=db.text("'basic'::character varying"))
|
|
|
|
|
status = mapped_column(db.String(255), nullable=False, server_default=db.text("'normal'::character varying"))
|
|
|
|
|
plan: Mapped[str] = mapped_column(db.String(255), server_default=db.text("'basic'::character varying"))
|
|
|
|
|
status: Mapped[str] = mapped_column(db.String(255), server_default=db.text("'normal'::character varying"))
|
|
|
|
|
custom_config = mapped_column(db.Text)
|
|
|
|
|
created_at = mapped_column(db.DateTime, nullable=False, server_default=func.current_timestamp())
|
|
|
|
|
updated_at = mapped_column(db.DateTime, nullable=False, server_default=func.current_timestamp())
|
|
|
|
|
@ -251,8 +253,8 @@ class AccountIntegrate(Base):
|
|
|
|
|
id = mapped_column(StringUUID, server_default=db.text("uuid_generate_v4()"))
|
|
|
|
|
account_id = mapped_column(StringUUID, nullable=False)
|
|
|
|
|
provider = mapped_column(db.String(16), nullable=False)
|
|
|
|
|
open_id = mapped_column(db.String(255), nullable=False)
|
|
|
|
|
encrypted_token = mapped_column(db.String(255), nullable=False)
|
|
|
|
|
open_id: Mapped[str] = mapped_column(db.String(255))
|
|
|
|
|
encrypted_token: Mapped[str] = mapped_column(db.String(255))
|
|
|
|
|
created_at = mapped_column(db.DateTime, nullable=False, server_default=func.current_timestamp())
|
|
|
|
|
updated_at = mapped_column(db.DateTime, nullable=False, server_default=func.current_timestamp())
|
|
|
|
|
|
|
|
|
|
|