41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
|
|
#ifndef UPDATE_USER_REQUEST_H
|
||
|
|
#define UPDATE_USER_REQUEST_H
|
||
|
|
|
||
|
|
#include <QString>
|
||
|
|
|
||
|
|
class UpdateUserRequest {
|
||
|
|
private:
|
||
|
|
QString passwordHash_; // Hashed password
|
||
|
|
QString salt_; // Salt for password hashing
|
||
|
|
QString username_; // Username
|
||
|
|
qint32 roleId_; // Role ID
|
||
|
|
qint32 userId_; // Unique user ID
|
||
|
|
|
||
|
|
public:
|
||
|
|
// Constructors
|
||
|
|
explicit UpdateUserRequest() = default;
|
||
|
|
explicit UpdateUserRequest(const QString &passwordHash, const QString &salt,
|
||
|
|
const QString &username, qint32 roleId,
|
||
|
|
qint32 userId)
|
||
|
|
: passwordHash_(passwordHash), roleId_(roleId), salt_(salt),
|
||
|
|
userId_(userId), username_(username) {}
|
||
|
|
|
||
|
|
// Setters (inline methods)
|
||
|
|
inline void setUserId(qint32 userId) { userId_ = userId; }
|
||
|
|
inline void setUsername(const QString &username) { username_ = username; }
|
||
|
|
inline void setPasswordHash(const QString &passwordHash) {
|
||
|
|
passwordHash_ = passwordHash;
|
||
|
|
}
|
||
|
|
inline void setSalt(const QString &salt) { salt_ = salt; }
|
||
|
|
inline void setRoleId(qint32 roleId) { roleId_ = roleId; }
|
||
|
|
|
||
|
|
// Getters (inline methods)
|
||
|
|
inline qint32 userId() const { return userId_; }
|
||
|
|
inline QString username() const { return username_; }
|
||
|
|
inline QString passwordHash() const { return passwordHash_; }
|
||
|
|
inline QString salt() const { return salt_; }
|
||
|
|
inline qint32 roleId() const { return roleId_; }
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // UPDATE_USER_REQUEST_H
|