27 Commits
Author SHA1 Message Date
pderaaij d345e522bd feat: add generic Value[T] base class for value objects
- Create Value[T] (frozen dataclass + ABC + Generic) in domain/framework/
- Migrate ClassifiedAdTitle and ClassifiedAdText to inherit Value[str]
- Standardize all value access via .value instead of type-specific fields
2026-07-29 11:13:17 -04:00
pderaaij 05229910cd refactor: move state mutation logic to when method, simplify set/update methods 2026-07-29 10:47:33 -04:00
pderaaij fa65782059 refactor: rename apply_event to apply 2026-07-29 10:44:12 -04:00
pderaaij 511a66ab66 feat: add no-op when method to Entity base class for event handling 2026-07-29 10:42:06 -04:00
pderaaij 494406d504 feat: add default _ensure_valid_state to Entity base class 2026-07-29 10:41:05 -04:00
pderaaij 7eace9212d refactor: rename raise_event to apply_event and _events to _changes 2026-07-29 10:40:04 -04:00
pderaaij 5bb6cedd03 feat: add FastAPI, Entity base class, and health check endpoint 2026-07-29 10:38:16 -04:00
pderaaij 2cb5045836 feat: set default state to Inactive, optional title/text with defaults, auto-raise ClassifiedAdCreated 2026-07-29 02:20:25 -04:00
pderaaij b8507e8941 feat: raise ClassifiedAdSentForReview event in request_to_publish 2026-07-29 02:15:40 -04:00
pderaaij 035cfdf4fc feat: add UpdateText and UpdatePrice to ClassifiedAd with domain events 2026-07-29 02:14:24 -04:00
pderaaij 2cf514995d refactor: use dataclasses.replace instead of manual field construction 2026-07-29 02:12:25 -04:00
pderaaij de0707bb4f feat: add SetTitle to ClassifiedAd with domain events, extract EnsureValidState 2026-07-29 02:11:17 -04:00
pderaaij 7cf7e56a93 feat: add DomainEvent base class and 5 domain event types 2026-07-29 01:46:58 -04:00
pderaaij 3bae739bc0 feat: add RequestToPublish to ClassifiedAd with state management 2026-07-29 01:37:34 -04:00
pderaaij d098a84b03 feat: add max 2 decimal places validation to Money 2026-07-29 01:20:50 -04:00
pderaaij 94ff7c83ce feat: add ClassifiedAdText value object and use it in ClassifiedAd 2026-07-27 14:29:18 -04:00
pderaaij ed83e021a0 feat: use ClassifiedAdTitle value object for ClassifiedAd.title 2026-07-26 11:39:25 -04:00
pderaaij 3df59767ea feat: add addition and subtraction to Money and Price 2026-07-26 08:08:43 -04:00
pderaaij 354ecbdd64 feat: use Price in ClassifiedAd and add negative price test 2026-07-26 07:58:15 -04:00
pderaaij 228dee50ce feat: add Price to marketplace re-exports 2026-07-26 07:54:20 -04:00
pderaaij 085cceb763 feat: add Price value object extending Money 2026-07-26 07:53:43 -04:00
pderaaij 3569270690 feat: use Money value object for ClassifiedAd.price 2026-07-26 07:31:14 -04:00
pderaaij 1ce54ae53a feat: add Money value object 2026-07-26 07:28:11 -04:00
pderaaij b14b494592 feat: add ClassifiedAdId value object and use it in ClassifiedAd 2026-07-26 07:22:03 -04:00
pderaaij 0b0c3802a4 feat: make ClassifiedAd._price optional with default 0.00 2026-07-26 07:19:02 -04:00
pderaaij fb8c221ee9 feat: add UserId value object and update ClassifiedAd to use it 2026-07-26 07:09:37 -04:00
pderaaij 69ab1233e6 feat: add ClassifiedAd domain entity 2026-07-26 07:02:30 -04:00