42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
#pragma once
|
|
#include <string>
|
|
#include "Map.h"
|
|
#include "Observer.h"
|
|
#include "Enums.h"
|
|
|
|
class Notification;
|
|
|
|
class User : public Observer
|
|
{
|
|
private:
|
|
static int m_uid;
|
|
std::string m_id;
|
|
std::string m_userName;
|
|
std::string m_password;
|
|
std::string m_name;
|
|
std::string m_phone;
|
|
std::string m_email;
|
|
util::Map<std::string, Notification*> m_notifications;
|
|
util::UserType m_type;
|
|
public:
|
|
User();
|
|
User(const std::string& userName, const std::string& password, const std::string& name, const std::string& phone, const std::string& email, util::UserType role);
|
|
~User();
|
|
const std::string& getId() const;
|
|
const std::string& getUserName() const;
|
|
const std::string& getPassword() const;
|
|
const std::string& getName() const;
|
|
const std::string& getPhone() const;
|
|
const std::string& getEmail() const;
|
|
util::Map<std::string, Notification*>& getNotifications();
|
|
util::UserType getUserType() const;
|
|
void setId(const std::string& id);
|
|
void setUserName(const std::string& userName);
|
|
void setPassword(const std::string& password);
|
|
void setName(const std::string& name);
|
|
void setPhone(const std::string& phone);
|
|
void setEmail(const std::string& email);
|
|
void addNotification(Notification* notification);
|
|
void setRole(util::UserType role);
|
|
};
|