feat: enhance organization management; add member registration and validation, update user registration flow, and improve enum handling
Test / test (push) Successful in 16s
Test / test (pull_request) Successful in 14s

This commit is contained in:
k1nq
2025-11-29 08:50:11 +05:00
parent 994b400221
commit e7e3752888
11 changed files with 462 additions and 20 deletions
+4 -2
View File
@@ -11,7 +11,7 @@ from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.types import JSON as GenericJSON, TypeDecorator
from sqlalchemy.orm import Mapped, mapped_column, relationship
from app.models.base import Base
from app.models.base import Base, enum_values
class ActivityType(StrEnum):
@@ -46,7 +46,9 @@ class Activity(Base):
author_id: Mapped[int | None] = mapped_column(
ForeignKey("users.id", ondelete="SET NULL"), nullable=True
)
type: Mapped[ActivityType] = mapped_column(SqlEnum(ActivityType, name="activity_type"), nullable=False)
type: Mapped[ActivityType] = mapped_column(
SqlEnum(ActivityType, name="activity_type", values_callable=enum_values), nullable=False
)
payload: Mapped[dict[str, Any]] = mapped_column(
JSONBCompat().with_variant(GenericJSON(), "sqlite"),
nullable=False,