feat: use Price in ClassifiedAd and add negative price test
This commit is contained in:
@@ -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")))
|
||||
|
||||
Reference in New Issue
Block a user