> For the complete documentation index, see [llms.txt](https://hanfak.gitbook.io/workspace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hanfak.gitbook.io/workspace/general-paradigms/architecture/patterns/domain/domain-object.md).

# Domain Object

* domain object as an object with an identity that is loaded from the database, manipulated for a certain use case, and then stored back into the database, usually within a database transaction.
* One domain object can just be used only for use cases and separate domain object is used for persistence
  * As database may need different fields compared to the usecase
* Can have behaviour based on the state of the object
* Can have validation on the construction of the object
