I am working on a web project, backend is Java
& Mysql
, the client include web(html5)
and app(IOS/Android)
, I have some doubt in design the account of the system.
There are 3 different types of account:
- Shop, shop account will have its own website,
- Customer, customer access shop/commodity via app(IOS/Android),
- Admin, manage everything of the system.
My basic idea of authentication:
There will be account
/ role
/ permission
table for sure, because both admin & customer will have quite complex user permission issue, customer also have different permission due to their history behavior.
I have kind decided to use Apache Shiro
, due to its simplicity & distributed session.
My question is:
(1) Should I create a single account table or 3 individual account tables.
(2) Any advise on design of 3 tables:
account
/ role
/ permission
?