refactor: removed nullable in models

This commit is contained in:
2025-10-11 10:34:05 +04:00
parent bd4f4138be
commit fbb0c72bce
7 changed files with 14 additions and 26 deletions

View File

@ -9,17 +9,13 @@ class IdMixin:
class SoftDeleteMixin:
is_deleted: Mapped[bool] = mapped_column(
default=False,
nullable=False,
)
is_deleted: Mapped[bool] = mapped_column(default=False)
class CreatedAtMixin:
created_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True),
default=lambda: datetime.now(timezone.utc),
nullable=False,
)
@ -27,7 +23,6 @@ class LastModifiedAtMixin:
last_modified_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True),
default=lambda: datetime.now(timezone.utc),
nullable=False,
)