Customer user and factory user in the same table
Date: Sat, 10 Aug 2019 15:01:02 +0200
Message-ID: <qimf6g$1nlh$1_at_gioia.aioe.org>
[Quoted] Hi everybody,
I have a dubt about how to store users in my db, I'd like to store customer users and factory users (for example the owner of a shop!) in the same table.
A customer will insert date of birth, and personal information and a factory user will insert for example a website, the brand of its shop, etc.
I didn't set above fields like "not null" so in the same table I can store both!
But... if a customer user is also a factory user he should have two different e-mails to have two different account!
It could be a good idea to store everyone like customers and enable a button like ENUM ("customer", "customer_and_factory") or true/false!
PRO: in this case the user could use just one email. CON: if a factory got more than one owner it will not possible to add other users!
I know it could be possible to enable a factory group but it's not so easy because I should add an "admin" for the group to manage add/delete features, etc.
Regards.
^Bart
Received on Sat Aug 10 2019 - 15:01:02 CEST