Coverage for src / lexigram / contracts / domain / __init__.py: 0%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-08-15 18:57 +0800

1"""Domain-driven design primitives package. 

2 

3Organized into focused submodules: 

4 

5* ``base`` – DomainModelProtocol and ID type variable 

6* ``events`` – DomainEvent and related helpers 

7* ``aggregates`` – AggregateRootProtocol (protocol only; implementation in ``lexigram.domain``) 

8* ``specification`` – SpecificationProtocol protocol 

9 

10Note: DomainModel, Entity, and ValueObject implementations have moved to 

11``lexigram.domain.base``. Import from there instead. 

12Note: The concrete ``AggregateRoot`` base class lives in ``lexigram.domain.models.aggregate``. 

13""" 

14 

15from __future__ import annotations 

16 

17# re-export core domain primitives for convenience 

18from lexigram.contracts.domain.aggregates import AggregateRootProtocol 

19from lexigram.contracts.domain.base import ( 

20 ID, 

21 DomainModelProtocol, 

22) 

23from lexigram.contracts.domain.events import DomainEvent 

24from lexigram.contracts.domain.idempotency import ( 

25 IdempotencyRecord, 

26 IdempotencyStatus, 

27) 

28from lexigram.contracts.domain.pagination import ( 

29 CursorPage, 

30 CursorPageProtocol, 

31 OffsetPageProtocol, 

32) 

33from lexigram.contracts.domain.specification import SpecificationProtocol 

34 

35__all__: list[str] = [ 

36 "ID", 

37 "AggregateRootProtocol", 

38 "CursorPage", 

39 "CursorPageProtocol", 

40 "DomainEvent", 

41 "DomainModelProtocol", 

42 "IdempotencyRecord", 

43 "IdempotencyStatus", 

44 "OffsetPageProtocol", 

45 "SpecificationProtocol", 

46]