Entities provide object-oriented abstractions for data and allow for extending functionality through inheritance and middleware hooks. Key features include:
- Extending from EventEmitter for event handling
- CRUD methods like create, read, update, and delete
- Before, after, and last hooks for adding middleware like validation
- Ability to extend entities for additional methods and inheritance
- Options to connect entities to data sources like MongoDB through adapters
Entities aim to abstract data access, inheritance, and middleware handling for building robust data models and APIs.
Related topics: