parking_lot_server/code.h

34 lines
595 B
C++

#ifndef CODE_H
#define CODE_H
#include <QString>
#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
#include <QVector>
class Code
{
public:
Code();
static Code *getInstance(); //静态的获取数据库对象的函数
//插入一个用户的随机码信息
bool insertUsr(QString name,QString code,QString number);
//根据name查找用户
bool findUsr(QString name,QString code);
//匹配name和pwd
bool match(QString name, QString pwd);
//删除用户信息
bool Delete(QString name);
QSqlDatabase db_;
};
#endif // CODE_H