Older/Database/Session.h
amass 1df434efba
Some checks failed
Deploy / Build (push) Failing after 3m26s
add chrono format of dbo.
2024-11-27 00:08:24 +08:00

26 lines
590 B
C++

#ifndef __SESSION_H__
#define __SESSION_H__
#include "HomeBox.h"
#include "Task.h"
#include "User.h"
#include <Wt/Auth/Login.h>
#include <Wt/Dbo/Session.h>
#include "VisitorRecord.h"
using UserDatabase = Wt::Auth::Dbo::UserDatabase<AuthInfo>;
class Session : public Wt::Dbo::Session {
public:
Session(Wt::Dbo::SqlConnectionPool &connectionPool);
~Session();
Wt::Dbo::ptr<User> user() const;
Wt::Auth::AbstractUserDatabase &users();
Wt::Auth::Login &login();
private:
std::unique_ptr<UserDatabase> m_users;
Wt::Auth::Login m_login;
};
#endif // __SESSION_H__