alchemy functions updated

This commit is contained in:
2024-11-10 12:14:10 +03:00
parent 1f75e49a07
commit e01a2c8afb
24 changed files with 543 additions and 389 deletions

View File

@@ -80,6 +80,8 @@ class CrudMixin(Base, SmartQueryMixin, SessionMixin, FilterAttributes):
creds: Credentials = None # The credentials to use in the model.
client_arrow: DateTimeLocal = None # The arrow to use in the model.
valid_record_dict: dict = {"active": True, "deleted": False}
valid_record_args = lambda class_: [class_.active == True, class_.deleted == False]
expiry_starts: Mapped[TIMESTAMP] = mapped_column(
TIMESTAMP, server_default=func.now(), nullable=False