Entities classes

2

I'm developing a sales project to which I have registered a funcionário that can also be vendedor , I will have a cliente that can be a pessoa física or pessoa jurídica , fornecedores that can be pessoa jurídica . The rule is that I will have a% com_commercial% to which will be bound to a proposta .

In the end I will have a cliente that will be mandatory as a venda , a cliente and a vendedor .

I created a proposta entity that could be used as pessoa , cliente and fornecedor . But what about the client, my question is, is it really necessary to have a funcionário entity? When I added it I was thinking that a cliente can not have a venda , because a pessoa can be pessoa and fornecedor and not a funcionário if the entity does not exist.

    
asked by anonymous 11.07.2018 / 13:40

1 answer

4

You're going the right way. I'm wondering if I should have Pessoa . This abstract is cool, but physically I do not think I should have it, almost always this is a mistake and in the database will only lose performance. Of course, you can do this, because conceptually there is nothing wrong, I just do not think it's a good idea.

I do not know this notation but it has 3 forms of relationship and I do not understand what two of them mean, they do not seem to be relationships.

I can not tell if you need Cliente or not, if it's just to have a id do not need, but there it's worth Funcionario and Vendedor too. And I do not know if I would link Vendedor to Funcionario , one day I might have a Vendedor who does not work there, or even be a legal person. You better unbind this.

    
11.07.2018 / 16:10