feat: add ClassifiedAd domain entity
This commit is contained in:
35
.agent/current-plan.md
Normal file
35
.agent/current-plan.md
Normal 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
|
||||
Reference in New Issue
Block a user