feat: add Price value object extending Money

This commit is contained in:
2026-07-26 07:53:43 -04:00
parent 3569270690
commit 085cceb763
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
from dataclasses import dataclass
from domain.marketplace.money import Money
@dataclass(frozen=True)
class Price(Money):
def __post_init__(self):
if self.amount < 0:
raise ValueError(f"Price cannot be negative: {self.amount}")