Files
RRJServer/LibDataBaseInterface/contactModel.h
2025-12-05 12:20:47 +03:00

53 lines
1.1 KiB
C++

#ifndef CONTACTMODEL_H
#define CONTACTMODEL_H
#include "instructor.h"
#include "trainee.h"
#include "user.h"
class ContactModel
{
public:
ContactModel(Instructor instructor)
{
login = instructor.getLogin();
name = instructor.getName();
type = 0;
loggedIn = instructor.getLoggedIn();
id = instructor.getID();
};
ContactModel(Trainee trainee)
{
login = trainee.getLogin();
name = trainee.getName();
type = 1;
loggedIn = trainee.getLoggedIn();
id = trainee.getID();
}
void setType(int type){this->type = type;}
int getType(){return type;}
void setName(QString name){this->name = name;}
QString getName(){return name;}
void setLoggedIn(bool loggedIn){this->loggedIn = loggedIn;}
bool getLoggedIn(){return loggedIn;}
void setLogin(QString login){this->login = login;}
QString getLogin(){return login;}
void setID(int id){this->id = id;}
int getID(){return id;}
private:
QString login;
QString name;
bool loggedIn;
int type;
int id;
};
#endif // CONTACTMODEL_H