mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
PSQL 30.10.2024
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
#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(QString appPath, DataBaseLMS* dbLMS = nullptr);
|
||||
~DataBaseInstructors();
|
||||
|
||||
void LoadInstructorsXML();
|
||||
void SaveInstructorsXML();
|
||||
|
||||
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;
|
||||
|
||||
QString appDirPath;
|
||||
|
||||
DataBaseLMS* dbLMS;
|
||||
};
|
||||
|
||||
#endif // DATABASEINSTRUCTORS_H
|
||||
Reference in New Issue
Block a user