refactor: removed nullable in models
This commit is contained in:
@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user