feat: use Price in ClassifiedAd and add negative price test

This commit is contained in:
2026-07-26 07:58:15 -04:00
parent 228dee50ce
commit 354ecbdd64
2 changed files with 22 additions and 11 deletions

View File

@@ -2,7 +2,7 @@ from dataclasses import dataclass, field
from decimal import Decimal
from domain.marketplace.classified_ad_id import ClassifiedAdId
from domain.marketplace.money import Money
from domain.marketplace.price import Price
from domain.marketplace.user_id import UserId
@@ -12,4 +12,4 @@ class ClassifiedAd:
_ownerId: UserId
title: str
text: str
price: Money = field(default_factory=lambda: Money(amount=Decimal("0.00")))
price: Price = field(default_factory=lambda: Price(amount=Decimal("0.00")))