#ifndef USER_H
#define USER_H

#include "basicentity.h"

class DATABASELMS_EXPORT User: public BasicEntity
{
public:
    static const QString TypeUserDBInstructor;
    static const QString TypeUserDBTrainee;
public:
    User();

    void setLogin(QString login){this->login = login;}
    QString getLogin(){return login;}

    void setPassword(QString password){this->password = password;}
    QString getPassword(){return password;}

    void setArchived(bool archived){this->archived = archived;}
    bool getArchived(){return archived;}

    void setLoggedIn(bool loggedIn){this->loggedIn = loggedIn;}
    bool getLoggedIn(){return loggedIn;}

    QString getTypeUserDB(){return TypeUserDB;}

    bool getNeedSetPassword(){return this->needSetPassword;}
    void setNeedSetPassword(bool needSetPassword){this->needSetPassword = needSetPassword;}

    void hashingPassword();

private:
    QString login;
    QString password;
    bool archived;
    bool loggedIn;
protected:
    QString TypeUserDB;

    bool isAdmin;
    bool needSetPassword;
};

#endif // USER_H
