Entity Building and Corporate Ownership Modeling in the DDD CQRS standard

Asked

Viewed 158 times

1

I am creating an ERP type application, and I am using the DDD CQRS Standard, where at the initial moment of the project I am creating the entities of customers, suppliers and carriers, where they inherit from the entity person, I thought to do it in several ways, but do not know which is the best for the standard used (DDD CQRS), would like opinions...

On the system, it will be multi tenant,

I would like tips on database linkage and domain modeling, if you have examples of other similar systems that used as standard DDD CQRS please be grateful.

Below is an example of the modeling prototype I’m thinking of doing. and below it the division of folders within the layer "Domain".

Modelagem de banco de dados Pessoa Física e Jurídica

Modelagem de domínio

1 answer

0

In your case you have 3 aggregates TRANSPORT, CUSTOMER AND SUPPLIER

these 3 entities, each and the Root of their aggregate, so vc would have a Repository for each one.

I would delete sharedcontext because each AGREGATEROOT has its repository

If you have the Person table, the Insert q will be made in it will have q from the customer, supplier and carrier.

For example:. The clienterepository class will have an Insert method that will receive the Clienteentity parameter. By calling this method internally it will turn to.write the data of its properties in the correct tables q in your case, it seems. q and client and person

Browser other questions tagged

You are not signed in. Login or sign up in order to post.