31 lines
484 B
C++
31 lines
484 B
C++
#ifndef USER_H
|
|
#define USER_H
|
|
|
|
#include <string>
|
|
|
|
enum class Role {
|
|
ADMIN,
|
|
PROF,
|
|
STUDENT
|
|
};
|
|
|
|
class User {
|
|
protected:
|
|
int id;
|
|
std::string username;
|
|
std::string passwordHash;
|
|
Role role;
|
|
|
|
public:
|
|
User(int id, const std::string& username, const std::string& passwordHash, Role role);
|
|
|
|
virtual ~User() = default;
|
|
|
|
int getId() const;
|
|
std::string getUsername() const;
|
|
Role getRole() const;
|
|
|
|
virtual void displayMenu() const = 0;
|
|
};
|
|
|
|
#endif |