- Reformatted function signatures in `organization_service.py` and `task_service.py` for better alignment. - Updated import statements across multiple files for consistency and organization. - Enhanced test files by improving formatting and ensuring consistent use of async session factories. - Added type hints and improved type safety in various service and test files. - Adjusted `pyproject.toml` to include configuration for isort, mypy, and ruff for better code quality checks. - Cleaned up unused imports and organized existing ones in several test files.
This commit is contained in:
+11
-3
@@ -1,4 +1,5 @@
|
||||
"""User ORM model and Pydantic schemas."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
@@ -25,13 +26,20 @@ class User(Base):
|
||||
name: Mapped[str] = mapped_column(String(255), nullable=False)
|
||||
is_active: Mapped[bool] = mapped_column(Boolean, default=True, nullable=False)
|
||||
created_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), server_default=func.now(), nullable=False
|
||||
DateTime(timezone=True),
|
||||
server_default=func.now(),
|
||||
nullable=False,
|
||||
)
|
||||
updated_at: Mapped[datetime] = mapped_column(
|
||||
DateTime(timezone=True), server_default=func.now(), onupdate=func.now(), nullable=False
|
||||
DateTime(timezone=True),
|
||||
server_default=func.now(),
|
||||
onupdate=func.now(),
|
||||
nullable=False,
|
||||
)
|
||||
|
||||
memberships = relationship("OrganizationMember", back_populates="user", cascade="all, delete-orphan")
|
||||
memberships = relationship(
|
||||
"OrganizationMember", back_populates="user", cascade="all, delete-orphan"
|
||||
)
|
||||
owned_contacts = relationship("Contact", back_populates="owner")
|
||||
owned_deals = relationship("Deal", back_populates="owner")
|
||||
activities = relationship("Activity", back_populates="author")
|
||||
|
||||
Reference in New Issue
Block a user