Redesign1 #1

Merged
yaro merged 36 commits from Redesign1 into main 2025-09-22 14:12:39 -05:00
Showing only changes of commit 1cf76edf56 - Show all commits

View file

@ -9,9 +9,10 @@ def _is_truthy(val):
return str(val).lower() in ('1', 'true', 'yes', 'on')
class CRUDService(Generic[T]):
def __init__(self, model: Type[T], session: Session):
def __init__(self, model: Type[T], session: Session, polymorphic: bool = False):
self.model = model
self.session = session
self.polymorphic = polymorphic
self.supports_soft_delete = hasattr(model, 'is_deleted')
def get(self, id: int, include_deleted: bool = False) -> T | None: