35 lines
850 B
Markdown
35 lines
850 B
Markdown
# 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 |