feat: add ClassifiedAd domain entity

This commit is contained in:
2026-07-26 07:02:30 -04:00
commit 69ab1233e6
8 changed files with 159 additions and 0 deletions

35
.agent/current-plan.md Normal file
View File

@@ -0,0 +1,35 @@
# Plan: ClassifiedAd Domain Entity
## Status: COMPLETED
## Objective
Create the first Domain Entity representing a ClassifiedAd with the specified attributes.
## Decisions Made
- **Location**: `domain/marketplace/classified_ad.py`
- **Class style**: `@dataclass(frozen=True)` for immutability
- **Validation**: No validation, just hold data
- **Tests**: Yes, create unit tests
## Entity Structure
```python
@dataclass(frozen=True)
class ClassifiedAd:
id: UUID
_ownerId: UUID
title: str
text: str
_price: Decimal
```
## Files Created
- `domain/__init__.py`
- `domain/marketplace/__init__.py`
- `domain/marketplace/classified_ad.py`
- `tests/test_classified_ad.py`
- `pyproject.toml`
## Test Results
- `test_classified_ad_creation` - PASSED
- `test_classified_ad_is_immutable` - PASSED
- `test_classified_ad_equality` - PASSED