Older/Database/VisitorRecord.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

22 lines
523 B
C++

#ifndef __VISITORRECORD_H__
#define __VISITORRECORD_H__
#include <Wt/Dbo/Dbo.h>
class VisitorRecord {
public:
std::string url;
std::string userAgent;
std::string visitorUuid;
std::chrono::system_clock::time_point time;
template <class Action>
void persist(Action &a) {
Wt::Dbo::field(a, url, "url");
Wt::Dbo::field(a, userAgent, "user_agent");
Wt::Dbo::field(a, visitorUuid, "visitor_uuid");
Wt::Dbo::field(a, time, "time");
}
};
#endif // __VISITORRECORD_H__