At first I understand good practice yes have in the same column the registration of Cpf and cnpj in the same field.
you would create a unique register of persons (both legal and physical) avoiding situations of duplication of these registrations.
It is also correct to use a field (flag) that defines the type of person, which could also be dispensable, if we consider that Cpf has 11 digits and cnpj has 14. In programming you can differentiate that by the length of the variable that brings that information.
An example of how useful this practice would be:
Suppose a company will make a purchase in your establishment.
It is relevant that in such a situation the registration of the legal person relates to a natural person as a legal representative.
Now suppose that this natural person already registered as a legal representative wishes to make a private purchase, with no link to the legal person he represents.
in this case you will already have the registration of this person without having to duplicate the information.
If there is doubt in how to proceed this binding of the legal representative to the company, the suggestion is to create a table for this link (n for n).
Thus, depending on the case or need, it will be possible to include several legal representatives (natural persons) for each company (legal entity), as well as it will be possible to inform the same natural person as legal representative of several companies.
In addition to avoid duplications of registrations in these cases, when situations occur that it is necessary to update a person’s registration, it will not be necessary to keep looking if he is legal representative of companies to update in these cases also.
In general I always recommend and apply this practice, but as Maniero well said, each case should be analyzed and done as really necessary and more efficient.
Thank you very much for your prompt reply. In reality as it is a fintech application, we will have the possibility a PF user can register in order to carry out banking operations, and in the same way in the future the idea is to contemplate account support for companies and legal entities. I am trying to structure a backend for this application. I will read your answers for sure.
– adamasan
Having PF and PJ account is different from having user, including it is common for a company to want to have multiple users, so I said that I think the concept may be wrong.
– Maniero
Yes, I will still give one more analyzed with the business part to understand the issue more in depth. Thanks for the heads up.
– adamasan