mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
更新QQtSql
This commit is contained in:
parent
0f5a47f5c5
commit
f630b23e00
@ -1,6 +1,5 @@
|
||||
#include "qqtframe.h"
|
||||
|
||||
QSqlDatabase managerDB;
|
||||
QString gUserName;
|
||||
QString gPassword;
|
||||
int gAuthority;
|
||||
|
@ -17,22 +17,11 @@
|
||||
#include <QSqlError>
|
||||
#include <QDir>
|
||||
#include <qqt-local.h>
|
||||
|
||||
#include <qqtsql.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
enum
|
||||
{
|
||||
Auth_Id = 0,
|
||||
Auth_Name,
|
||||
Auth_Passwd,
|
||||
Auth_Authrity,
|
||||
Auth_Creater,
|
||||
Auth_CreateTime,
|
||||
Auth_Comment,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
Lib_Id = 0,
|
||||
@ -42,20 +31,6 @@ enum
|
||||
Lib_Comment,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
Authority_Id = 0,
|
||||
Authority_Level,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
Auth_Admin = 0,
|
||||
Auth_Manager,
|
||||
Auth_User,
|
||||
Auth_Max
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
Method_Id = 0,
|
||||
@ -76,7 +51,6 @@ enum
|
||||
Stage_MethodId,
|
||||
};
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
Type_Standard = 0,
|
||||
@ -92,15 +66,6 @@ enum
|
||||
};
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
Event_ID,
|
||||
Event_Name,
|
||||
Event_Time,
|
||||
Event_User,
|
||||
Event_Content,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
Event_TypeId,
|
||||
@ -151,27 +116,13 @@ enum
|
||||
|
||||
#define CONFIG_PATH "./conf"
|
||||
#define LOG_PATH "./log"
|
||||
#define DB_METHOD_PATH "Method"
|
||||
#define DB_DATA_PATH "Data"
|
||||
#define AV_PATH "./res"
|
||||
#define DB_PINYIN "PinYin.db"
|
||||
#define DB_MANAGER "Manager.db"
|
||||
#define DB_QQT "System.db"
|
||||
#define DB_USER "User.db"
|
||||
#define DB_EXTRACT "Extract.db"
|
||||
#define DB_REPORT_P "Data/Method_Time.db"
|
||||
#define DB_EVENT "SysEvent.db"
|
||||
#define DB_DATA "SampleResult.db"
|
||||
#define TABLE_USERINFO "User"
|
||||
#define TABLE_AUTHORITY "Authority"
|
||||
|
||||
#define TABLE_LIBRARY "Library"
|
||||
#define TABLE_METHOD "Method"
|
||||
#define TABLE_STAGE "Stage"
|
||||
#define TABLE_EVENT "Event"
|
||||
#define TABLE_EVTYPE "Type"
|
||||
#define TABLE_YANGPINDATA "data"
|
||||
|
||||
extern QSqlDatabase managerDB;
|
||||
extern QString gUserName;
|
||||
extern QString gPassword;
|
||||
extern int gAuthority;
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <QTimer>
|
||||
#include <QTextCodec>
|
||||
#include <qqt-local.h>
|
||||
#include <qqtframe.h>
|
||||
#include <qqtsql.h>
|
||||
|
||||
namespace Ui {
|
||||
class QQtInput;
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "qqtsql.h"
|
||||
|
||||
QSqlDatabase managerDB;
|
||||
|
||||
QSqlDatabase newDatabaseConn()
|
||||
{
|
||||
QUuid uuid = QUuid::createUuid();
|
||||
|
@ -20,9 +20,58 @@
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
enum
|
||||
{
|
||||
Auth_Id = 0,
|
||||
Auth_Name,
|
||||
Auth_Passwd,
|
||||
Auth_Authrity,
|
||||
Auth_Creater,
|
||||
Auth_CreateTime,
|
||||
Auth_Comment,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
Authority_Id = 0,
|
||||
Authority_Level,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
Auth_Admin = 0,
|
||||
Auth_Manager,
|
||||
Auth_User,
|
||||
Auth_Max
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
Event_ID,
|
||||
Event_Name,
|
||||
Event_Time,
|
||||
Event_User,
|
||||
Event_Content,
|
||||
};
|
||||
|
||||
#define DB_TYPE "QSQLITE"
|
||||
#define DB_PATH "./db"
|
||||
|
||||
#define DB_PINYIN "PinYin.db"
|
||||
#define DB_MANAGER "Manager.db"
|
||||
#define DB_EVENT "SysEvent.db"
|
||||
#define DB_METHOD_PATH "Method"
|
||||
#define DB_DATA_PATH "Data"
|
||||
#define DB_QQT "System.db"
|
||||
#define DB_USER "User.db"
|
||||
#define DB_DATA "Data.db"
|
||||
|
||||
#define TABLE_USERINFO "User"
|
||||
#define TABLE_AUTHORITY "Authority"
|
||||
#define TABLE_EVENT "Event"
|
||||
|
||||
extern QSqlDatabase managerDB;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
Loading…
x
Reference in New Issue
Block a user