There are different architectures, the main purpose of which is to isolate the domain of our application from the frameworks as pure architecture, onion architecture, hexagonal architecture.
To achieve this isolation, implementation details are hidden as a data layer. The border or port is defined at the domain level that defines access to the stored data, but not knowing how it is stored, the repository template is usually used to implement this architecture requirement.
With these requirements, we will usually have a persistence model and differentiated domain objects. Sustainability models can and should be associated with the framework that we use, for example, in the Kingdom.
I leave a chart where you can better understand it graphically.

source share