N
N
Nubbb2021-07-19 22:33:22
Database design
Nubbb, 2021-07-19 22:33:22

How to design tables correctly?

Good evening!

Can you tell me how to design the base?

there is a table of users users - id, first_name, lsat_name
there is a table of shops shops - id, name, logo, slug

a store can have several employees - store admin, manager, kontenschik
and each store employee has their own roles for managing the store - admin, manager, content_manager
and each role has its own privileges

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jazzus, 2021-07-19
@Nubbb

users
shops
roles
perms
user_shops (user_id shop_id) - manyToMany
user_roles (user_id role_id) - manyToMany
role_perms (role_id perm_id) - manyToMany

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question