PSQL 01.11.2024

This commit is contained in:
krivoshein
2024-11-01 11:45:13 +03:00
parent 024cd38bd6
commit 9422c5e257
274 changed files with 3223 additions and 3102 deletions

View File

@@ -0,0 +1,58 @@
#ifndef DATABASEINSTRUCTORS_H
#define DATABASEINSTRUCTORS_H
#include <QList>
#include <QObject>
#include "instructorsAndTrainees_global.h"
#include "instructor.h"
#include "databaselms.h"
class INSTRUCTORSANDTRAINEES_EXPORT DataBaseInstructors : QObject
{
Q_OBJECT
public:
DataBaseInstructors(DataBaseLMS* dbLMS);
~DataBaseInstructors();
void LoadInstructorsPSQL();
bool AuthorizationInstructor(QString login, QString password);
bool deAuthorizationInstructor(QString login);
QList<Instructor> getListInstructors(){ return listOfInstructors; } //Для загрузки
Instructor getInstructor(QString name);
QString getNameInstructorByLogin(QString login);
QString getAuthorizedInstructorName();
QString newInstructor();
void deleteInstructor(QString name);
void toArchiveInstructor(QString name);
void fromeArchiveInstructor(QString name);
bool editInstructor(QString name, Instructor instructor);
bool isAdmin(QString name);
bool isArchived(QString name);
private:
QString generateDefaultNameInstructor();
bool checkExistNameInstructor(QString name);
QString generateDefaultLoginInstructor();
bool checkExistLoginInstructor(QString login);
private:
QList<Instructor> listOfInstructors;
bool adminMode;
DataBaseLMS* dbLMS;
};
#endif // DATABASEINSTRUCTORS_H