jeudi 1 juillet 2021

Create role for entity in java?

I have a company management system and in this company we have 2 roles, MANAGER and EMPLOYEE so MANAGER can:

  • create , edit, delete product
  • create, edit, delete EMPLOYEE

EMPLOYEE can:

  • view, sell product
  • delete himself account

Do I need create 2 classes for MANAGER and EMPLOYEE or create only 1 class USER and has 2 roles. And what is the best database design for this situation?

Aucun commentaire:

Enregistrer un commentaire