domain.py 263 B

12345678910111213141516
  1. from clean_python import Repository
  2. from clean_python import RootEntity
  3. from clean_python import ValueObject
  4. class Author(ValueObject):
  5. name: str
  6. class Book(RootEntity):
  7. author: Author
  8. title: str
  9. class BookRepository(Repository[Book]):
  10. pass