Implement sales tenant pipeline events

This commit is contained in:
Magzhan Zhumabayev
2026-05-10 18:24:06 +05:00
parent 24ccdb3e73
commit 866d96e560
30 changed files with 24412 additions and 281 deletions
+19
View File
@@ -50,6 +50,25 @@ class AuthOIDCState(Base):
consumed_at: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
class Tenant(Base):
__tablename__ = "tenants"
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
tenant_id: Mapped[str] = mapped_column(String(64), unique=True, index=True)
name: Mapped[str] = mapped_column(String(256), index=True)
business_type: Mapped[str | None] = mapped_column(String(128), nullable=True, index=True)
industry: Mapped[str | None] = mapped_column(String(128), nullable=True, index=True)
country: Mapped[str | None] = mapped_column(String(128), nullable=True, index=True)
city: Mapped[str | None] = mapped_column(String(128), nullable=True, index=True)
timezone: Mapped[str] = mapped_column(String(64), default="Asia/Almaty")
language_preferences_json: Mapped[str] = mapped_column(Text, default='["ru"]')
default_currency: Mapped[str] = mapped_column(String(16), default="KZT", index=True)
subscription_plan: Mapped[str | None] = mapped_column(String(64), nullable=True, index=True)
is_active: Mapped[bool] = mapped_column(Boolean, default=True, index=True)
created_at: Mapped[str] = mapped_column(String(64), index=True)
updated_at: Mapped[str] = mapped_column(String(64), index=True)
class Customer(Base):
__tablename__ = "customers"