feat: Implement domain logic separation with clean architecture
- Created complete domain layer with pure business logic - Implemented Issue domain models with 48 passing tests - Implemented Project domain models with 31 passing tests - Added domain services for complex business operations - Established clean separation between domain, application, and infrastructure - All 250 tests passing with no breaking changes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
28
domain/projects/exceptions.py
Normal file
28
domain/projects/exceptions.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""
|
||||
Domain-specific exceptions for project management.
|
||||
"""
|
||||
|
||||
|
||||
class ProjectDomainError(Exception):
|
||||
"""Base exception for project domain errors."""
|
||||
|
||||
def __init__(self, message: str, project_name: str = None):
|
||||
super().__init__(message)
|
||||
self.project_name = project_name
|
||||
|
||||
|
||||
class ProjectValidationError(ProjectDomainError):
|
||||
"""Exception raised when project validation fails."""
|
||||
|
||||
def __init__(self, message: str, field: str = None, value=None):
|
||||
super().__init__(message)
|
||||
self.field = field
|
||||
self.value = value
|
||||
|
||||
|
||||
class MilestoneError(ProjectDomainError):
|
||||
"""Exception raised when milestone operations fail."""
|
||||
|
||||
def __init__(self, message: str, milestone_id: int = None):
|
||||
super().__init__(message)
|
||||
self.milestone_id = milestone_id
|
||||
Reference in New Issue
Block a user