feat: implement repository and unit-of-work patterns for service layer operations

This commit is contained in:
2025-11-09 16:59:58 +01:00
parent c6fdc2d923
commit c69f933684
4 changed files with 209 additions and 0 deletions

9
services/exceptions.py Normal file
View File

@@ -0,0 +1,9 @@
"""Domain-level exceptions for service and repository layers."""
class EntityNotFoundError(Exception):
"""Raised when a requested entity cannot be located."""
class EntityConflictError(Exception):
"""Raised when attempting to create or update an entity that violates uniqueness."""