Older/Database/VisitorRecord.h

22 lines
523 B
C
Raw Normal View History

2024-11-27 00:08:24 +08:00
#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__