I am creating a database modeling in the most comprehensive way possible. The entities are Person, Individual, Legal Entity, Supplier and Customer
Below the person entity. I add the person's contact information and address to facilitate future inquiries.
public class Pessoa {
private String ativo;
private String apelido;
private Endereco endereco;
private String dataAtualizacao;
private String foneResidencial;
private String nome;
private String foneCelular;
private String foneProfissional;
private String sexo;
private String dataNascimento;
private String dataCadastro;
private String email;
}
Tisic person is calm:
public class PessoaFisica {
private String estadoEmissor;
private Pessoa pessoa;
private String RG;
private String orgaoEmissor;
private String dataAtualizacao;
private String paisNascimento;
private String CPF;
private Profissao profissao;
private String localNascimento;
private String estadoNascimento;
private EstadoCivil estadoCivil;
}
Legal entity is also calm:
public class PessoaJuridica extends EntidadeAbstrata implements Serializable {
private String nomeFantasia;
private Pessoa pessoa;
private String Razao;
private String CNPJ;
}
What is complicating for me is understanding Customer and Vendor.
First, what attributes would differentiate them within the base?
And what I find most difficult is: how my Cliente
or Fornecedor
could be PessoaFisica
or PessoaJuridica
being within the same table.
/ ******** UPDATE ******** /
When I asked the question, I confessed that I was not entirely sure what I was asked. I'll explain my idea of 'girico' better.
I'm trying to create a comprehensive registration model not in the sense of having a modeling ready and that is fully applied to any business, but in the sense of always having a starting point for any system that I will develop. I do not deny that it is a somewhat crazy wish, masssss
When I made the question related to Customer and Supplier, I did it because when it comes to Physical or Legal, the thing is clearer, at least for me.
Individuals CPF, GR, Civil Status etc Legal Entity, CNPJ, State Enrollment etc.
When I asked about customer / supplier I found that someone with more experience would identify attributes for these entities more easily.
Anyway, I'm open to ideas and criticism. Bora see what you give
Thanks!